Skip to content

Commit 06acb20

Browse files
committed
Unserialize: Migrate "Error at offset %d of %d bytes" to E_WARNING
1 parent 67b36d9 commit 06acb20

39 files changed

+75
-75
lines changed

Zend/tests/bug70253.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Bug #70253 (segfault at _efree () in zend_alloc.c:1389)
55
unserialize('a:2:{i:0;O:9:"000000000":10000000');
66
?>
77
--EXPECTF--
8-
Notice: unserialize(): Error at offset 33 of 33 bytes in %s on line %d
8+
Warning: unserialize(): Error at offset 33 of 33 bytes in %s on line %d

Zend/tests/enum/unserialize-const.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ var_dump(unserialize('E:7:"Foo:Baz";'));
1414
--EXPECTF--
1515
Warning: unserialize(): Foo::Baz is not an enum case in %s on line %d
1616

17-
Notice: unserialize(): Error at offset 14 of 14 bytes in %s on line %d
17+
Warning: unserialize(): Error at offset 14 of 14 bytes in %s on line %d
1818
bool(false)

Zend/tests/enum/unserialize-missing-colon.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ var_dump(unserialize('E:6:"FooBar";'));
1313
--EXPECTF--
1414
Warning: unserialize(): Invalid enum name 'FooBar' (missing colon) in %s on line %d
1515

16-
Notice: unserialize(): Error at offset 0 of 13 bytes in %s on line %d
16+
Warning: unserialize(): Error at offset 0 of 13 bytes in %s on line %d
1717
bool(false)

Zend/tests/enum/unserialize-non-enum.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ var_dump(unserialize('E:7:"Foo:Bar";'));
1111
--EXPECTF--
1212
Warning: unserialize(): Class 'Foo' is not an enum in %s on line %d
1313

14-
Notice: unserialize(): Error at offset 0 of 14 bytes in %s on line %d
14+
Warning: unserialize(): Error at offset 0 of 14 bytes in %s on line %d
1515
bool(false)

Zend/tests/enum/unserialize-non-existent-case.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ var_dump(unserialize('E:7:"Foo:Baz";'));
1313
--EXPECTF--
1414
Warning: unserialize(): Undefined constant Foo::Baz in %s on line %d
1515

16-
Notice: unserialize(): Error at offset 14 of 14 bytes in %s on line %d
16+
Warning: unserialize(): Error at offset 14 of 14 bytes in %s on line %d
1717
bool(false)

ext/gmp/tests/bug74670.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ $str = 'C:3:"GMP":4:{s:6666666666:""}';
88
var_dump(unserialize($str));
99
?>
1010
--EXPECTF--
11-
Notice: unserialize(): Error at offset 13 of 29 bytes in %s on line %d
11+
Warning: unserialize(): Error at offset 13 of 29 bytes in %s on line %d
1212
bool(false)

ext/phar/tests/phar_metadata_write3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Calling getMetadata with too low max_depth
7979

8080
Warning: Phar::getMetadata(): Maximum depth of 1 exceeded. The depth limit can be changed using the max_depth unserialize() option or the unserialize_max_depth ini setting in %sphar_metadata_write3.php on line 39
8181

82-
Notice: Phar::getMetadata(): Error at offset 34 of 59 bytes in %sphar_metadata_write3.php on line 39
82+
Warning: Phar::getMetadata(): Error at offset 34 of 59 bytes in %sphar_metadata_write3.php on line 39
8383
bool(false)
8484
Calling getMetadata with some allowed classes
8585
In wakeup

ext/session/tests/bug72562.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function ptr2str($ptr)
4040
--EXPECTF--
4141
Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%ebug72562.php on line %d
4242

43-
Notice: unserialize(): Error at offset 0 of 1 bytes in %s%ebug72562.php on line %d
43+
Warning: unserialize(): Error at offset 0 of 1 bytes in %s on line %d
4444

45-
Notice: unserialize(): Error at offset 4 of 4 bytes in %s%ebug72562.php on line %d
45+
Warning: unserialize(): Error at offset 4 of 4 bytes in %s on line %d
4646
bool(false)

ext/standard/tests/serialize/005.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Deprecated: %s implements the Serializable interface, which is deprecated. Imple
157157

158158
Warning: Erroneous data format for unserializing 'TestNANew' in %s005.php on line %d
159159

160-
Notice: unserialize(): Error at offset 19 of 20 bytes in %s005.php on line %d
160+
Warning: unserialize(): Error at offset 19 of 20 bytes in %s on line %d
161161
bool(false)
162162
===NANew2===
163163
unserializer(TestNANew2)

ext/standard/tests/serialize/__serialize_006.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ var_dump(unserialize('O:4:"Test":1:{}'));
1313
--EXPECTF--
1414
Warning: unserialize(): Unexpected end of serialized data in %s on line %d
1515

16-
Notice: unserialize(): Error at offset 14 of 15 bytes in %s on line %d
16+
Warning: unserialize(): Error at offset 14 of 15 bytes in %s on line %d
1717
bool(false)

0 commit comments

Comments
 (0)