diff options
-rw-r--r-- | Zend/tests/bug33999.phpt | 4 | ||||
-rw-r--r-- | Zend/tests/cast_to_double.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/cast_to_int.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/offset_string.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/settype_double.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/settype_int.phpt | 2 | ||||
-rw-r--r-- | Zend/zend_operators.c | 2 | ||||
-rw-r--r-- | ext/gd/tests/bug67248.phpt | 6 | ||||
-rw-r--r-- | ext/posix/tests/posix_ttyname_variation6.phpt | 18 | ||||
-rw-r--r-- | ext/spl/tests/countable_count_variation1.phpt | 2 | ||||
-rw-r--r-- | ext/standard/tests/array/array_multisort_variation9.phpt | 8 | ||||
-rw-r--r-- | ext/standard/tests/general_functions/gettype_settype_basic.phpt | 8 | ||||
-rw-r--r-- | ext/standard/tests/general_functions/gettype_settype_variation2.phpt | 12 | ||||
-rw-r--r-- | ext/standard/tests/general_functions/gettype_settype_variation3.phpt | 12 | ||||
-rw-r--r-- | ext/standard/tests/general_functions/intval_variation1.phpt | 15 | ||||
-rw-r--r-- | ext/standard/tests/strings/sprintf_variation54.phpt | bin | 2174 -> 2179 bytes | |||
-rw-r--r-- | ext/xml/tests/xml_parser_set_option_variation3.phpt | 2 |
17 files changed, 41 insertions, 58 deletions
diff --git a/Zend/tests/bug33999.phpt b/Zend/tests/bug33999.phpt index 7460815441..2b03c3124a 100644 --- a/Zend/tests/bug33999.phpt +++ b/Zend/tests/bug33999.phpt @@ -23,8 +23,8 @@ object(Foo)#1 (1) { string(3) "bat" } -Notice: Object of class Foo could not be converted to int in %sbug33999.php on line 9 +Warning: Object of class Foo could not be converted to int in %s on line %d int(1) -Notice: Object of class Foo could not be converted to float in %sbug33999.php on line 12 +Warning: Object of class Foo could not be converted to float in %s on line %d float(1) diff --git a/Zend/tests/cast_to_double.phpt b/Zend/tests/cast_to_double.phpt index 58286436bd..2972fbbe80 100644 --- a/Zend/tests/cast_to_double.phpt +++ b/Zend/tests/cast_to_double.phpt @@ -52,6 +52,6 @@ float(1) float(0) float(%f) -Notice: Object of class test could not be converted to float in %s on line %d +Warning: Object of class test could not be converted to float in %s on line %d float(1) Done diff --git a/Zend/tests/cast_to_int.phpt b/Zend/tests/cast_to_int.phpt index 5dbab23fd2..6451c4a2f7 100644 --- a/Zend/tests/cast_to_int.phpt +++ b/Zend/tests/cast_to_int.phpt @@ -50,6 +50,6 @@ int(1) int(0) int(%d) -Notice: Object of class test could not be converted to int in %s on line %d +Warning: Object of class test could not be converted to int in %s on line %d int(1) Done diff --git a/Zend/tests/offset_string.phpt b/Zend/tests/offset_string.phpt index 36481dccce..f14c63af5d 100644 --- a/Zend/tests/offset_string.phpt +++ b/Zend/tests/offset_string.phpt @@ -69,7 +69,7 @@ Warning: String offset cast occurred in %s on line %d string(1) "S" Cannot access offset of type resource on string -Notice: Object of class stdClass could not be converted to int in %s on line %d +Warning: Object of class stdClass could not be converted to int in %s on line %d Cannot access offset of type stdClass on string Cannot access offset of type array on string Done diff --git a/Zend/tests/settype_double.phpt b/Zend/tests/settype_double.phpt index d5b2f0e42e..6bbe773d0c 100644 --- a/Zend/tests/settype_double.phpt +++ b/Zend/tests/settype_double.phpt @@ -52,6 +52,6 @@ float(1) float(0) float(%f) -Notice: Object of class test could not be converted to float in %s on line %d +Warning: Object of class test could not be converted to float in %s on line %d float(1) Done diff --git a/Zend/tests/settype_int.phpt b/Zend/tests/settype_int.phpt index 9dac9c5b8f..e5eb098a67 100644 --- a/Zend/tests/settype_int.phpt +++ b/Zend/tests/settype_int.phpt @@ -50,6 +50,6 @@ int(1) int(0) int(%d) -Notice: Object of class test could not be converted to int in %s on line %d +Warning: Object of class test could not be converted to int in %s on line %d int(1) Done diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 0923741723..5f9dbe3d3c 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -142,7 +142,7 @@ ZEND_API zend_long ZEND_FASTCALL zend_atol(const char *str, size_t str_len) /* { #define convert_object_to_type(op, dst, ctype) \ ZVAL_UNDEF(dst); \ if (Z_OBJ_HT_P(op)->cast_object(Z_OBJ_P(op), dst, ctype) == FAILURE) { \ - zend_error(E_NOTICE, \ + zend_error(E_WARNING, \ "Object of class %s could not be converted to %s", ZSTR_VAL(Z_OBJCE_P(op)->name),\ zend_get_type_by_const(ctype)); \ } \ diff --git a/ext/gd/tests/bug67248.phpt b/ext/gd/tests/bug67248.phpt index 5b5e0e8bae..c48512e281 100644 --- a/ext/gd/tests/bug67248.phpt +++ b/ext/gd/tests/bug67248.phpt @@ -19,7 +19,7 @@ for($i=0;$i<7;$i++) { !! [TypeError] imageaffinematrixget(): Argument #1 ($type) must be of type array when using translate or scale !! [TypeError] imageaffinematrixget(): Argument #1 ($type) must be of type array when using translate or scale -Notice: Object of class stdClass could not be converted to float in %s on line %d +Warning: Object of class stdClass could not be converted to float in %s on line %d array(6) { [0]=> float(%f) @@ -35,7 +35,7 @@ array(6) { float(0) } -Notice: Object of class stdClass could not be converted to float in %s on line %d +Warning: Object of class stdClass could not be converted to float in %s on line %d array(6) { [0]=> float(1) @@ -51,7 +51,7 @@ array(6) { float(0) } -Notice: Object of class stdClass could not be converted to float in %s on line %d +Warning: Object of class stdClass could not be converted to float in %s on line %d array(6) { [0]=> float(1) diff --git a/ext/posix/tests/posix_ttyname_variation6.phpt b/ext/posix/tests/posix_ttyname_variation6.phpt index 691c5eea7e..4af6334b2f 100644 --- a/ext/posix/tests/posix_ttyname_variation6.phpt +++ b/ext/posix/tests/posix_ttyname_variation6.phpt @@ -16,18 +16,6 @@ if (!extension_loaded('posix')) { echo "*** Test substituting argument 1 with object values ***\n"; - - -function test_error_handler($err_no, $err_msg, $filename, $linenum) { - if (error_reporting() != 0) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - - - class classWithToString { public function __toString() { @@ -51,7 +39,9 @@ foreach ( $variation_array as $var ) { ?> --EXPECTF-- *** Test substituting argument 1 with object values *** -Error: 8 - Object of class classWithToString could not be converted to int, %s(%d) + +Warning: Object of class classWithToString could not be converted to int in %s on line %d bool(false) -Error: 8 - Object of class classWithoutToString could not be converted to int, %s(%d) + +Warning: Object of class classWithoutToString could not be converted to int in %s on line %d bool(false) diff --git a/ext/spl/tests/countable_count_variation1.phpt b/ext/spl/tests/countable_count_variation1.phpt index 8ce29410d9..0e17eccbe6 100644 --- a/ext/spl/tests/countable_count_variation1.phpt +++ b/ext/spl/tests/countable_count_variation1.phpt @@ -60,7 +60,7 @@ Count returns a string: int(0) Count returns an object: -Notice: Object of class returnObject could not be converted to int in %s on line 40 +Warning: Object of class returnObject could not be converted to int in %s on line %d int(1) Count returns an array: int(1) diff --git a/ext/standard/tests/array/array_multisort_variation9.phpt b/ext/standard/tests/array/array_multisort_variation9.phpt index 0451daca33..d7203c335b 100644 --- a/ext/standard/tests/array/array_multisort_variation9.phpt +++ b/ext/standard/tests/array/array_multisort_variation9.phpt @@ -33,13 +33,13 @@ var_dump($inputs); --EXPECTF-- *** Testing array_multisort() : usage variation - test sort order of all types*** -Notice: Object of class classWithToString could not be converted to float in %sarray_multisort_variation9.php on line %d +Warning: Object of class classWithToString could not be converted to float in %s on line %d -Notice: Object of class classWithToString could not be converted to float in %sarray_multisort_variation9.php on line %d +Warning: Object of class classWithToString could not be converted to float in %s on line %d -Notice: Object of class classWithoutToString could not be converted to float in %sarray_multisort_variation9.php on line %d +Warning: Object of class classWithoutToString could not be converted to float in %s on line %d -Notice: Object of class classWithoutToString could not be converted to float in %sarray_multisort_variation9.php on line %d +Warning: Object of class classWithoutToString could not be converted to float in %s on line %d bool(true) array(10) { ["float -10.5"]=> diff --git a/ext/standard/tests/general_functions/gettype_settype_basic.phpt b/ext/standard/tests/general_functions/gettype_settype_basic.phpt index 0c336f8a23..a5e1a0b5bf 100644 --- a/ext/standard/tests/general_functions/gettype_settype_basic.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_basic.phpt @@ -237,7 +237,7 @@ bool(true) int(%d) string(7) "integer" -- Iteration 14 -- -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" @@ -296,7 +296,7 @@ bool(true) int(%d) string(7) "integer" -- Iteration 14 -- -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" @@ -355,7 +355,7 @@ bool(true) float(%f) string(6) "double" -- Iteration 14 -- -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" @@ -414,7 +414,7 @@ bool(true) float(%f) string(6) "double" -- Iteration 14 -- -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" diff --git a/ext/standard/tests/general_functions/gettype_settype_variation2.phpt b/ext/standard/tests/general_functions/gettype_settype_variation2.phpt index 91561715ac..12f001e924 100644 --- a/ext/standard/tests/general_functions/gettype_settype_variation2.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_variation2.phpt @@ -554,19 +554,19 @@ int(-512000) string(7) "integer" -- Iteration 76 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" -- Iteration 77 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" -- Iteration 78 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" @@ -949,19 +949,19 @@ int(-512000) string(7) "integer" -- Iteration 76 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" -- Iteration 77 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" -- Iteration 78 -- string(6) "object" -8: Object of class point could not be converted to int +2: Object of class point could not be converted to int bool(true) int(1) string(7) "integer" diff --git a/ext/standard/tests/general_functions/gettype_settype_variation3.phpt b/ext/standard/tests/general_functions/gettype_settype_variation3.phpt index 75e01cfccf..16cc2b8dfd 100644 --- a/ext/standard/tests/general_functions/gettype_settype_variation3.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_variation3.phpt @@ -548,19 +548,19 @@ float(-512000) string(6) "double" -- Iteration 76 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" -- Iteration 77 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" -- Iteration 78 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" @@ -943,19 +943,19 @@ float(-512000) string(6) "double" -- Iteration 76 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" -- Iteration 77 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" -- Iteration 78 -- string(6) "object" -8: Object of class point could not be converted to float +2: Object of class point could not be converted to float bool(true) float(1) string(6) "double" diff --git a/ext/standard/tests/general_functions/intval_variation1.phpt b/ext/standard/tests/general_functions/intval_variation1.phpt index f2e3db9f10..c18910a1d8 100644 --- a/ext/standard/tests/general_functions/intval_variation1.phpt +++ b/ext/standard/tests/general_functions/intval_variation1.phpt @@ -4,15 +4,6 @@ Test intval() function : usage variation <?php echo "*** Testing intval() : usage variation ***\n"; -// Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum) { - if (error_reporting() & $err_no) { - // report non-silenced errors - echo "Error: $err_no - $err_msg, $filename($linenum)\n"; - } -} -set_error_handler('test_error_handler'); - // Initialise function arguments not being substituted (if any) $base = 10; @@ -181,11 +172,13 @@ int(0) int(0) --instance of classWithToString-- -Error: 8 - Object of class classWithToString could not be converted to int, %s(%d) + +Warning: Object of class classWithToString could not be converted to int in %s on line %d int(1) --instance of classWithoutToString-- -Error: 8 - Object of class classWithoutToString could not be converted to int, %s(%d) + +Warning: Object of class classWithoutToString could not be converted to int in %s on line %d int(1) --undefined var-- diff --git a/ext/standard/tests/strings/sprintf_variation54.phpt b/ext/standard/tests/strings/sprintf_variation54.phpt Binary files differindex 82efde8d7f..51a4e48827 100644 --- a/ext/standard/tests/strings/sprintf_variation54.phpt +++ b/ext/standard/tests/strings/sprintf_variation54.phpt diff --git a/ext/xml/tests/xml_parser_set_option_variation3.phpt b/ext/xml/tests/xml_parser_set_option_variation3.phpt index d1163de356..a6b3a9b6ec 100644 --- a/ext/xml/tests/xml_parser_set_option_variation3.phpt +++ b/ext/xml/tests/xml_parser_set_option_variation3.phpt @@ -162,7 +162,7 @@ bool(true) Arg value Some Ascii Data -Notice: Object of class aClass could not be converted to int in %s on line %d +Warning: Object of class aClass could not be converted to int in %s on line %d bool(true) Arg value Resource id %s |