Skip to content

Commit 308f6dd

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

38 files changed

+74
-74
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/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)

ext/standard/tests/serialize/bug25378.phpt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,41 @@ var_dump(unserialize("s:3:\"123;"));
1717
var_dump(unserialize("s:0:\"123\";"));
1818
?>
1919
--EXPECTF--
20-
Notice: unserialize(): Error at offset 0 of 8 bytes in %sbug25378.php on line %d
20+
Warning: unserialize(): Error at offset 0 of 8 bytes in %s on line %d
2121
bool(false)
2222

23-
Notice: unserialize(): Error at offset 0 of 5 bytes in %sbug25378.php on line %d
23+
Warning: unserialize(): Error at offset 0 of 5 bytes in %s on line %d
2424
bool(false)
2525

26-
Notice: unserialize(): Error at offset 13 of 19 bytes in %sbug25378.php on line %d
26+
Warning: unserialize(): Error at offset 13 of 19 bytes in %s on line %d
2727
bool(false)
2828

29-
Notice: unserialize(): Error at offset 14 of 19 bytes in %sbug25378.php on line %d
29+
Warning: unserialize(): Error at offset 14 of 19 bytes in %s on line %d
3030
bool(false)
3131

32-
Notice: unserialize(): Error at offset 2 of 22 bytes in %sbug25378.php on line %d
32+
Warning: unserialize(): Error at offset 2 of 22 bytes in %s on line %d
3333
bool(false)
3434

35-
Notice: unserialize(): Error at offset 17 of 18 bytes in %sbug25378.php on line %d
35+
Warning: unserialize(): Error at offset 17 of 18 bytes in %s on line %d
3636
bool(false)
3737

38-
Notice: unserialize(): Error at offset 24 of 33 bytes in %sbug25378.php on line %d
38+
Warning: unserialize(): Error at offset 24 of 33 bytes in %s on line %d
3939
bool(false)
4040

41-
Notice: unserialize(): Error at offset 17 of 33 bytes in %sbug25378.php on line %d
41+
Warning: unserialize(): Error at offset 17 of 33 bytes in %s on line %d
4242
bool(false)
4343

44-
Notice: unserialize(): Error at offset 32 of 32 bytes in %sbug25378.php on line %d
44+
Warning: unserialize(): Error at offset 32 of 32 bytes in %s on line %d
4545
bool(false)
4646

47-
Notice: unserialize(): Error at offset 2 of 13 bytes in %sbug25378.php on line %d
47+
Warning: unserialize(): Error at offset 2 of 13 bytes in %s on line %d
4848
bool(false)
4949

50-
Notice: unserialize(): Error at offset 2 of 11 bytes in %sbug25378.php on line %d
50+
Warning: unserialize(): Error at offset 2 of 11 bytes in %s on line %d
5151
bool(false)
5252

53-
Notice: unserialize(): Error at offset 8 of 9 bytes in %sbug25378.php on line %d
53+
Warning: unserialize(): Error at offset 8 of 9 bytes in %s on line %d
5454
bool(false)
5555

56-
Notice: unserialize(): Error at offset 5 of 10 bytes in %sbug25378.php on line %d
56+
Warning: unserialize(): Error at offset 5 of 10 bytes in %s on line %d
5757
bool(false)

0 commit comments

Comments
 (0)