From f3108b5f818b2757d2e518f37d3927e83858ae4f Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sat, 1 Sep 2012 14:37:45 +0800 Subject: [PATCH] Remove extra blank in notice message, should act as same as vm --- ext/spl/spl_array.c | 14 +++++++------- ext/spl/spl_iterators.c | 2 +- .../tests/arrayObject___construct_basic2.phpt | 4 ++-- .../tests/arrayObject___construct_basic3.phpt | 4 ++-- .../tests/arrayObject___construct_basic4.phpt | 10 +++++----- .../tests/arrayObject___construct_basic5.phpt | 10 +++++----- ext/spl/tests/arrayObject_magicMethods1.phpt | 4 ++-- ext/spl/tests/arrayObject_magicMethods3.phpt | 4 ++-- ext/spl/tests/arrayObject_magicMethods4.phpt | 4 ++-- ext/spl/tests/arrayObject_magicMethods6.phpt | 4 ++-- ext/spl/tests/arrayObject_setFlags_basic1.phpt | 4 ++-- ext/spl/tests/array_001.phpt | 8 ++++---- ext/spl/tests/array_010.phpt | 8 ++++---- ext/spl/tests/bug45622.phpt | 2 +- ext/spl/tests/bug45622b.phpt | 4 ++-- ext/spl/tests/bug54323.phpt | 2 +- ext/spl/tests/bug62978.phpt | 8 ++++---- ext/spl/tests/iterator_044.phpt | 16 ++++++++-------- 18 files changed, 56 insertions(+), 56 deletions(-) diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 0b3b5a3e54c74..3c6b41edbc975 100755 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -323,13 +323,13 @@ static zval **spl_array_get_dimension_ptr_ptr(int check_inherited, zval *object, if (zend_symtable_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void **) &retval) == FAILURE) { switch (type) { case BP_VAR_R: - zend_error(E_NOTICE, "Undefined index: %s", Z_STRVAL_P(offset)); + zend_error(E_NOTICE, "Undefined index: %s", Z_STRVAL_P(offset)); case BP_VAR_UNSET: case BP_VAR_IS: retval = &EG(uninitialized_zval_ptr); break; case BP_VAR_RW: - zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); + zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); case BP_VAR_W: { zval *value; ALLOC_INIT_ZVAL(value); @@ -351,13 +351,13 @@ static zval **spl_array_get_dimension_ptr_ptr(int check_inherited, zval *object, if (zend_hash_index_find(ht, index, (void **) &retval) == FAILURE) { switch (type) { case BP_VAR_R: - zend_error(E_NOTICE, "Undefined offset: %ld", index); + zend_error(E_NOTICE, "Undefined offset: %ld", index); case BP_VAR_UNSET: case BP_VAR_IS: retval = &EG(uninitialized_zval_ptr); break; case BP_VAR_RW: - zend_error(E_NOTICE, "Undefined offset: %ld", index); + zend_error(E_NOTICE, "Undefined offset: %ld", index); case BP_VAR_W: { zval *value; ALLOC_INIT_ZVAL(value); @@ -520,11 +520,11 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval } if (ht == &EG(symbol_table)) { if (zend_delete_global_variable(Z_STRVAL_P(offset), Z_STRLEN_P(offset) TSRMLS_CC)) { - zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); + zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); } } else { if (zend_symtable_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1) == FAILURE) { - zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); + zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); } else { spl_array_object *obj = intern; @@ -570,7 +570,7 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval return; } if (zend_hash_index_del(ht, index) == FAILURE) { - zend_error(E_NOTICE,"Undefined offset: %ld", Z_LVAL_P(offset)); + zend_error(E_NOTICE,"Undefined offset: %ld", Z_LVAL_P(offset)); } break; default: diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index e5dc030730ede..098d7dc1e29d1 100755 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -2820,7 +2820,7 @@ SPL_METHOD(CachingIterator, offsetGet) } if (zend_symtable_find(HASH_OF(intern->u.caching.zcache), arKey, nKeyLength+1, (void**)&value) == FAILURE) { - zend_error(E_NOTICE, "Undefined index: %s", arKey); + zend_error(E_NOTICE, "Undefined index: %s", arKey); return; } diff --git a/ext/spl/tests/arrayObject___construct_basic2.phpt b/ext/spl/tests/arrayObject___construct_basic2.phpt index 9ff0e4257a48f..bd27c42774215 100644 --- a/ext/spl/tests/arrayObject___construct_basic2.phpt +++ b/ext/spl/tests/arrayObject___construct_basic2.phpt @@ -63,7 +63,7 @@ bool(true) Notice: Undefined property: ArrayObject::$prop in %s on line 40 -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 NULL NULL - After: @@ -91,7 +91,7 @@ bool(true) Notice: Undefined property: MyArrayObject::$prop in %s on line 40 -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 NULL NULL - After: diff --git a/ext/spl/tests/arrayObject___construct_basic3.phpt b/ext/spl/tests/arrayObject___construct_basic3.phpt index 1abd1a1ab1275..11a17a6dc461a 100644 --- a/ext/spl/tests/arrayObject___construct_basic3.phpt +++ b/ext/spl/tests/arrayObject___construct_basic3.phpt @@ -63,7 +63,7 @@ bool(true) Notice: Undefined property: ArrayObject::$prop in %s on line 40 -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 NULL NULL - After: @@ -91,7 +91,7 @@ bool(true) Notice: Undefined property: MyArrayObject::$prop in %s on line 40 -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 NULL NULL - After: diff --git a/ext/spl/tests/arrayObject___construct_basic4.phpt b/ext/spl/tests/arrayObject___construct_basic4.phpt index 80f5e0861e54d..b0809de0d4e9c 100644 --- a/ext/spl/tests/arrayObject___construct_basic4.phpt +++ b/ext/spl/tests/arrayObject___construct_basic4.phpt @@ -61,11 +61,11 @@ bool(true) bool(true) - Unset: -Notice: Undefined index: prop in %s on line 39 +Notice: Undefined index: prop in %s on line 39 -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 NULL NULL - After: @@ -91,9 +91,9 @@ bool(true) bool(true) - Unset: -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 NULL NULL - After: diff --git a/ext/spl/tests/arrayObject___construct_basic5.phpt b/ext/spl/tests/arrayObject___construct_basic5.phpt index 5368d250a12f9..8c44ee2ce44cf 100644 --- a/ext/spl/tests/arrayObject___construct_basic5.phpt +++ b/ext/spl/tests/arrayObject___construct_basic5.phpt @@ -61,11 +61,11 @@ bool(true) bool(true) - Unset: -Notice: Undefined index: prop in %s on line 39 +Notice: Undefined index: prop in %s on line 39 -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 NULL NULL - After: @@ -91,9 +91,9 @@ bool(true) bool(true) - Unset: -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined index: prop in %s on line 40 NULL NULL - After: diff --git a/ext/spl/tests/arrayObject_magicMethods1.phpt b/ext/spl/tests/arrayObject_magicMethods1.phpt index b1de4a951e4cb..ec4812f107979 100644 --- a/ext/spl/tests/arrayObject_magicMethods1.phpt +++ b/ext/spl/tests/arrayObject_magicMethods1.phpt @@ -102,7 +102,7 @@ object(ArrayObject)#2 (1) { --> Read existent, non-existent and dynamic: string(7) "changed" -Notice: Undefined index: nonexistent in %s on line 42 +Notice: Undefined index: nonexistent in %s on line 42 NULL string(11) "new.changed" Original wrapped object: @@ -171,7 +171,7 @@ object(ArrayObject)#2 (1) { --> Unset existent, non-existent and dynamic: -Notice: Undefined index: nonexistent in %s on line 60 +Notice: Undefined index: nonexistent in %s on line 60 Original wrapped object: object(UsesMagic)#1 (3) { ["b"]=> diff --git a/ext/spl/tests/arrayObject_magicMethods3.phpt b/ext/spl/tests/arrayObject_magicMethods3.phpt index 16a6a3b80c5b6..6231ceabb7f89 100644 --- a/ext/spl/tests/arrayObject_magicMethods3.phpt +++ b/ext/spl/tests/arrayObject_magicMethods3.phpt @@ -102,7 +102,7 @@ object(ArrayObject)#2 (1) { --> Read existent, non-existent and dynamic: string(7) "changed" -Notice: Undefined index: nonexistent in %s on line 42 +Notice: Undefined index: nonexistent in %s on line 42 NULL string(11) "new.changed" Original wrapped object: @@ -171,7 +171,7 @@ object(ArrayObject)#2 (1) { --> Unset existent, non-existent and dynamic: -Notice: Undefined index: nonexistent in %s on line 60 +Notice: Undefined index: nonexistent in %s on line 60 Original wrapped object: object(UsesMagic)#1 (3) { ["b"]=> diff --git a/ext/spl/tests/arrayObject_magicMethods4.phpt b/ext/spl/tests/arrayObject_magicMethods4.phpt index 3c9f78781ad61..9580dc5ae72b3 100644 --- a/ext/spl/tests/arrayObject_magicMethods4.phpt +++ b/ext/spl/tests/arrayObject_magicMethods4.phpt @@ -107,7 +107,7 @@ object(UsesMagic)#2 (2) { --> Read existent, non-existent and dynamic: string(7) "changed" -Notice: Undefined index: nonexistent in %s on line 45 +Notice: Undefined index: nonexistent in %s on line 45 NULL string(11) "new.changed" Original wrapped object: @@ -180,7 +180,7 @@ object(UsesMagic)#2 (2) { --> Unset existent, non-existent and dynamic: -Notice: Undefined index: nonexistent in %s on line 63 +Notice: Undefined index: nonexistent in %s on line 63 Original wrapped object: object(C)#1 (3) { ["b"]=> diff --git a/ext/spl/tests/arrayObject_magicMethods6.phpt b/ext/spl/tests/arrayObject_magicMethods6.phpt index 45a0e4a768d3a..b43f56c2b0669 100644 --- a/ext/spl/tests/arrayObject_magicMethods6.phpt +++ b/ext/spl/tests/arrayObject_magicMethods6.phpt @@ -107,7 +107,7 @@ object(UsesMagic)#2 (2) { --> Read existent, non-existent and dynamic: string(7) "changed" -Notice: Undefined index: nonexistent in %s on line 45 +Notice: Undefined index: nonexistent in %s on line 45 NULL string(11) "new.changed" Original wrapped object: @@ -180,7 +180,7 @@ object(UsesMagic)#2 (2) { --> Unset existent, non-existent and dynamic: -Notice: Undefined index: nonexistent in %s on line 63 +Notice: Undefined index: nonexistent in %s on line 63 Original wrapped object: object(C)#1 (3) { ["b"]=> diff --git a/ext/spl/tests/arrayObject_setFlags_basic1.phpt b/ext/spl/tests/arrayObject_setFlags_basic1.phpt index d8d4f2e96d501..391b0eeae7136 100644 --- a/ext/spl/tests/arrayObject_setFlags_basic1.phpt +++ b/ext/spl/tests/arrayObject_setFlags_basic1.phpt @@ -44,8 +44,8 @@ string(21) "array element.changed" --> Remove the array element and try access again: bool(false) -Notice: Undefined index: p in %s on line 10 +Notice: Undefined index: p in %s on line 10 NULL -Notice: Undefined index: p in %s on line 12 +Notice: Undefined index: p in %s on line 12 string(8) ".changed" diff --git a/ext/spl/tests/array_001.phpt b/ext/spl/tests/array_001.phpt index d9fb57c4ceb01..b55fcba1fdc1f 100755 --- a/ext/spl/tests/array_001.phpt +++ b/ext/spl/tests/array_001.phpt @@ -79,15 +79,15 @@ object(ArrayObject)#%d (1) { } int(0) -Notice: Undefined offset: 6 in %sarray_001.php on line %d +Notice: Undefined offset: 6 in %sarray_001.php on line %d NULL -Notice: Undefined index: b in %sarray_001.php on line %d +Notice: Undefined index: b in %sarray_001.php on line %d NULL -Notice: Undefined offset: 7 in %sarray_001.php on line %d +Notice: Undefined offset: 7 in %sarray_001.php on line %d -Notice: Undefined index: c in %sarray_001.php on line %d +Notice: Undefined index: c in %sarray_001.php on line %d object(ArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(2) { diff --git a/ext/spl/tests/array_010.phpt b/ext/spl/tests/array_010.phpt index 6b331e4b5163b..d2f3de7f6dc56 100755 --- a/ext/spl/tests/array_010.phpt +++ b/ext/spl/tests/array_010.phpt @@ -94,10 +94,10 @@ int(1) string(3) "3rd" int(4) -Notice: Undefined index: 5th in %sarray_010.php on line %d +Notice: Undefined index: 5th in %sarray_010.php on line %d NULL -Notice: Undefined offset: 6 in %sarray_010.php on line %d +Notice: Undefined offset: 6 in %sarray_010.php on line %d NULL ===offsetSet=== WRITE 1 @@ -128,9 +128,9 @@ array(6) { string(9) "changed 6" } -Notice: Undefined offset: 7 in %sarray_010.php on line %d +Notice: Undefined offset: 7 in %sarray_010.php on line %d -Notice: Undefined index: 8th in %sarray_010.php on line %d +Notice: Undefined index: 8th in %sarray_010.php on line %d array(4) { [0]=> string(3) "1st" diff --git a/ext/spl/tests/bug45622.phpt b/ext/spl/tests/bug45622.phpt index c47b62cbdfda8..a8fe2c464141d 100644 --- a/ext/spl/tests/bug45622.phpt +++ b/ext/spl/tests/bug45622.phpt @@ -42,7 +42,7 @@ bool(true) --> Remove the array element and try access again: bool(false) -Notice: Undefined index: p in %s on line %d +Notice: Undefined index: p in %s on line %d NULL --> Re-add the real property: diff --git a/ext/spl/tests/bug45622b.phpt b/ext/spl/tests/bug45622b.phpt index 9d49392111c54..f101a8459da24 100644 --- a/ext/spl/tests/bug45622b.phpt +++ b/ext/spl/tests/bug45622b.phpt @@ -25,9 +25,9 @@ isset($ao->prop4); --EXPECTF-- Doesn't trigger __get. -Notice: Undefined index: prop1 in %s on line 11 +Notice: Undefined index: prop1 in %s on line 11 Doesn't trigger __set. Doesn't trigger __unset. -Notice: Undefined index: prop3 in %s on line 17 +Notice: Undefined index: prop3 in %s on line 17 Shouldn't trigger __isset. \ No newline at end of file diff --git a/ext/spl/tests/bug54323.phpt b/ext/spl/tests/bug54323.phpt index 35a16a4637dc7..df6416a0f1839 100644 --- a/ext/spl/tests/bug54323.phpt +++ b/ext/spl/tests/bug54323.phpt @@ -19,6 +19,6 @@ function testAccess($c, $ao) { --EXPECTF-- Notice: Undefined property: C::$prop in %sbug54323.php on line 14 -Notice: Undefined index: prop in %sbug54323.php on line 14 +Notice: Undefined index: prop in %sbug54323.php on line 14 NULL NULL diff --git a/ext/spl/tests/bug62978.phpt b/ext/spl/tests/bug62978.phpt index 94068d56045de..0d91609f88700 100644 --- a/ext/spl/tests/bug62978.phpt +++ b/ext/spl/tests/bug62978.phpt @@ -25,7 +25,7 @@ var_dump($a[$fp]); fclose($fp); --EXPECTF-- -Notice: Undefined index: epic_magic in %sbug62978.php on line %d +Notice: Undefined index: epic_magic in %sbug62978.php on line %d NULL Notice: Undefined index: epic_magic in %sbug62978.php on line %d @@ -34,17 +34,17 @@ NULL Notice: Undefined variable: c in %sbug62978.php on line %d NULL -Notice: Undefined index: epic_magic in %sbug62978.php on line %d +Notice: Undefined index: epic_magic in %sbug62978.php on line %d NULL Notice: Undefined index: epic_magic in %sbug62978.php on line %d NULL -Notice: Undefined index: epic_magic in %sbug62978.php on line %d +Notice: Undefined index: epic_magic in %sbug62978.php on line %d NULL bool(false) Strict Standards: Resource ID#%d used as offset, casting to integer (%d) in %sbug62978.php on line %d -Notice: Undefined offset: %d in %sbug62978.php on line %d +Notice: Undefined offset: %d in %sbug62978.php on line %d NULL diff --git a/ext/spl/tests/iterator_044.phpt b/ext/spl/tests/iterator_044.phpt index 6d2553117537a..1271ccaa6495f 100755 --- a/ext/spl/tests/iterator_044.phpt +++ b/ext/spl/tests/iterator_044.phpt @@ -81,7 +81,7 @@ NULL int(0) bool(false) -Notice: Undefined index: 0 in %siterator_044.php on line %d +Notice: Undefined index: 0 in %siterator_044.php on line %d NULL ===1=== object(stdClass)#%d (0) { @@ -97,31 +97,31 @@ object(MyFoo)#%d (0) { } bool(false) -Notice: Undefined index: foo in %siterator_044.php on line %d +Notice: Undefined index: foo in %siterator_044.php on line %d NULL ===3=== NULL bool(false) -Notice: Undefined index: in %siterator_044.php on line %d +Notice: Undefined index: in %siterator_044.php on line %d NULL ===4=== int(2) bool(false) -Notice: Undefined index: 2 in %siterator_044.php on line %d +Notice: Undefined index: 2 in %siterator_044.php on line %d NULL ===5=== string(3) "foo" bool(false) -Notice: Undefined index: foo in %siterator_044.php on line %d +Notice: Undefined index: foo in %siterator_044.php on line %d NULL ===6=== int(3) bool(false) -Notice: Undefined index: 3 in %siterator_044.php on line %d +Notice: Undefined index: 3 in %siterator_044.php on line %d NULL ===FILL=== ===0=== @@ -146,7 +146,7 @@ int(1) NULL bool(false) -Notice: Undefined index: in %siterator_044.php on line %d +Notice: Undefined index: in %siterator_044.php on line %d NULL ===4=== int(2) @@ -160,6 +160,6 @@ int(1) int(3) bool(false) -Notice: Undefined index: 3 in %siterator_044.php on line %d +Notice: Undefined index: 3 in %siterator_044.php on line %d NULL ===DONE===