summaryrefslogtreecommitdiff
path: root/ext/filter/tests/bug49274.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/filter/tests/bug49274.phpt')
-rw-r--r--ext/filter/tests/bug49274.phpt10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/filter/tests/bug49274.phpt b/ext/filter/tests/bug49274.phpt
new file mode 100644
index 0000000..c87e6be
--- /dev/null
+++ b/ext/filter/tests/bug49274.phpt
@@ -0,0 +1,10 @@
+--TEST--
+#49274, fatal error when an object does not implement toString
+--SKIPIF--
+<?php if (!extension_loaded("filter")) die("skip"); ?>
+--FILE--
+<?php
+var_dump(filter_var(new stdClass, FILTER_VALIDATE_EMAIL));
+?>
+--EXPECTF--
+bool(false)