You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Zend/tests/zend_ini/zend_ini_parse_quantity_error.phpt
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,15 @@ $tests = [
13
13
'1X', # Unknown multiplier.
14
14
'1.0K', # Non integral digits.
15
15
16
+
'0X', # Valid prefix with no value
17
+
'0Z', # Invalid prefix
18
+
'0XK', # Valid prefix with no value and multiplier
19
+
20
+
'++',
21
+
'-+',
22
+
'+ 25',
23
+
'- 25',
24
+
16
25
# Null bytes
17
26
" 123\x00K",
18
27
"\x00 123K",
@@ -48,6 +57,41 @@ int(1)
48
57
Warning: Invalid quantity "1.0K", interpreting as"1K" for backwards compatibility in %s%ezend_ini_parse_quantity_error.php on line %d
49
58
int(1024)
50
59
60
+
# "0X"
61
+
62
+
Warning: Invalid quantity "0X": no digits after base prefix, interpreting as"0" for backwards compatibility in %s%ezend_ini_parse_quantity_error.php on line %d
63
+
int(0)
64
+
65
+
# "0Z"
66
+
67
+
Warning: Invalid prefix "0Z", interpreting as"0" for backwards compatibility in %s%ezend_ini_parse_quantity_error.php on line %d
68
+
int(0)
69
+
70
+
# "0XK"
71
+
72
+
Warning: Invalid quantity "0XK": no valid leading digits, interpreting as"0" for backwards compatibility in %s%ezend_ini_parse_quantity_error.php on line %d
73
+
int(0)
74
+
75
+
# "++"
76
+
77
+
Warning: Invalid quantity "++": no valid leading digits, interpreting as"0" for backwards compatibility in %s%ezend_ini_parse_quantity_error.php on line %d
78
+
int(0)
79
+
80
+
# "-+"
81
+
82
+
Warning: Invalid quantity "-+": no valid leading digits, interpreting as"0" for backwards compatibility in %s%ezend_ini_parse_quantity_error.php on line %d
83
+
int(0)
84
+
85
+
# "+ 25"
86
+
87
+
Warning: Invalid quantity "+ 25": no valid leading digits, interpreting as"0" for backwards compatibility in %s%ezend_ini_parse_quantity_error.php on line %d
88
+
int(0)
89
+
90
+
# "- 25"
91
+
92
+
Warning: Invalid quantity "- 25": no valid leading digits, interpreting as"0" for backwards compatibility in %s%ezend_ini_parse_quantity_error.php on line %d
93
+
int(0)
94
+
51
95
# " 123\000K"
52
96
53
97
Warning: Invalid quantity " 123\x00K", interpreting as" 123K" for backwards compatibility in %s on line %d
0 commit comments