Test: /ext/mbstring/tests/bug45923.phpt - Version 7.4.8        

Bug #45923 mb_st[r]ripos() offset not handled correctly
Submitted: 2008-08-26 16:07:42 Modified: 2009-02-14 10:13:42
From: d_kelsey Assigned: moriyoshi
Status: Closed Package: mbstring related
PHP Version: 5.*CVS (2009-01-21) OS: *

There are 2 different diffs reported by users for this test.

Count Diff
4 (67%)
033+ int(6) 033- int(4) 035+ int(6) 035- int(8) 037+ int(12) 037- bool(false) 039+ int(12) 039- bool(false) 041+ int(12) 042+ > Offset: -1 043+ bool(false) 044+ > Offset: -3 045+ bool(false) 046+ > Offset: -6 047+ int(12) 048+ > Offset: -20 044- > Offset: -1 052+ 053+ ------- stripos ----------- 054+ 055+ > Offset: 0 056+ int(0) 057+ > Offset: 3 058+ int(4) 059+ > Offset: 6 060+ int(8) 061+ > Offset: 9 052- Warning: mb_strpos(): Offset not contained in string in %s on line %d 055- ------- stripos ----------- 060- int(4) 062- int(8) 063+ > Offset: 11 064+ bool(false) 065+ > Offset: 12 066+ 067+ Warning: stripos(): Offset not contained in string in %s/bug45923.php on line 8 068+ bool(false) 069+ > Offset: -1 070+ bool(false) 064- bool(false) 066- bool(false) 068- 069- Warning: stripos(): Offset not contained in string in %s on line %d 070- bool(false) 074- int(8) 076- int(8) 077+ Warning: stripos(): Offset not contained in string in %s/bug45923.php on line 8 079- Warning: stripos(): Offset not contained in string in %s on line %d 080+ ------- mb_stripos ----------- 082- ------- mb_stripos ----------- 085+ int(6) 085- int(0) 087+ int(6) 087- int(4) 089+ int(12) 091+ int(12) 093+ int(12) 096- Warning: mb_stripos(): Offset not contained in string in %s on line %d 097+ bool(false) 099+ int(12) 099- bool(false) 102+ Warning: mb_stripos(): Offset not contained in string in %s/bug45923.php on line 8 103- int(8) 105+ ------- strrpos ----------- 106- Warning: mb_stripos(): Offset not contained in string in %s on line %d 108+ int(8) 109- ------- strrpos ----------- 110+ int(8) 112- int(8) 114- int(8) 116- int(8) 118- bool(false) 119+ Warning: strrpos(): Offset is greater than the length of haystack string in %s/bug45923.php on line 8 120- bool(false) 122+ int(8) 123- Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d 125- > Offset: -1 126+ int(4) 127- > Offset: -3 129+ Warning: strrpos(): Offset is greater than the length of haystack string in %s/bug45923.php on line 8 132+ ------- mb_strrpos ----------- 133- Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d 135+ int(12) 136- ------- mb_strrpos ----------- 137+ int(12) 139+ int(12) 139- int(8) 141+ int(12) 141- int(8) 143+ int(12) 143- int(8) 145+ int(12) 146+ > Offset: -1 147+ int(12) 148+ > Offset: -3 149+ int(12) 150+ > Offset: -6 151+ int(6) 152+ > Offset: -20 145- bool(false) 147- bool(false) 150- Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d 154+ Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s/bug45923.php on line 8 156+ 157+ ------- strripos ----------- 158+ 159+ > Offset: 0 161+ > Offset: 3 162+ int(8) 163+ > Offset: 6 165+ > Offset: 9 166+ bool(false) 167+ > Offset: 11 168+ bool(false) 169+ > Offset: 12 170+ 171+ Warning: strripos(): Offset is greater than the length of haystack string in %s/bug45923.php on line 8 172+ bool(false) 173+ > Offset: -1 174+ int(8) 175+ > Offset: -3 176+ int(8) 181+ Warning: strripos(): Offset is greater than the length of haystack string in %s/bug45923.php on line 8 184+ ------- mb_strripos ----------- 187+ int(12) 189+ int(12) 191+ int(12) 193+ int(12) 195+ int(12) 197+ int(12) 198+ > Offset: -1 199+ int(12) 200+ > Offset: -3 201+ int(12) 202+ > Offset: -6 203+ int(6) 204+ > Offset: -20 206+ Warning: mb_strripos(): Offset is greater than the length of haystack string in %s/bug45923.php on line 8 152- > Offset: -1 153- int(8) 154- > Offset: -3 155- int(8) 156- > Offset: -6 157- int(4) 158- > Offset: -20 159- 160- Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d 161- bool(false) 162- 163- ------- strripos ----------- 164- 165- > Offset: 0 166- int(8) 167- > Offset: 3 168- int(8) 169- > Offset: 6 170- int(8) 171- > Offset: 9 172- bool(false) 173- > Offset: 11 174- bool(false) 175- > Offset: 12 176- 177- Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 178- bool(false) 179- > Offset: -1 180- int(8) 181- > Offset: -3 182- int(8) 183- > Offset: -6 184- int(4) 185- > Offset: -20 186- 187- Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 188- bool(false) 189- 190- ------- mb_strripos ----------- 191- 192- > Offset: 0 193- int(8) 194- > Offset: 3 195- int(8) 196- > Offset: 6 197- int(8) 198- > Offset: 9 199- bool(false) 200- > Offset: 11 201- bool(false) 202- > Offset: 12 203- 204- Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d 205- bool(false) 206- > Offset: -1 207- int(8) 208- > Offset: -3 209- int(8) 210- > Offset: -6 211- int(4) 212- > Offset: -20 213- 214- Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d 215- bool(false)
2 (33%)
033+ int(10) 033- int(4) 035+ int(10) 035- int(8) 037+ int(10) 037- bool(false) 039+ int(20) 039- bool(false) 041+ int(20) 041- 042- Warning: mb_strpos(): Offset not contained in string in %s on line %d 043- bool(false) 045+ bool(false) 047+ bool(false) 047- int(8) 049+ int(10) 049- int(8) 052- Warning: mb_strpos(): Offset not contained in string in %s on line %d 053- bool(false) 054- 083+ int(10) 085+ int(10) 087+ int(10) 087- int(4) 089+ int(20) 089- int(8) 091+ int(20) 091- bool(false) 093- bool(false) 095+ bool(false) 095- 096- Warning: mb_stripos(): Offset not contained in string in %s on line %d 097- bool(false) 097+ bool(false) 099+ int(10) 101- int(8) 103- int(8) 106- Warning: mb_stripos(): Offset not contained in string in %s on line %d 107- bool(false) 108- 131+ int(20) 133+ int(20) 135+ int(20) 137+ int(20) 139+ int(20) 139- int(8) 141+ int(20) 142+ > Offset: -1 143+ int(20) 144+ > Offset: -3 145+ int(20) 146+ > Offset: -6 147+ int(20) 148+ > Offset: -20 149+ int(0) 141- int(8) 143- int(8) 145- bool(false) 147- bool(false) 150- Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d 151+ ------- strripos ----------- 152+ 153+ > Offset: 0 154+ int(8) 155+ > Offset: 3 156+ int(8) 157+ > Offset: 6 158+ int(8) 159+ > Offset: 9 160- Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d 161+ > Offset: 11 162+ bool(false) 163+ > Offset: 12 164+ 165+ Warning: strripos(): Offset is greater than the length of haystack string in %s/bug45923.php on line 8 166+ bool(false) 163- ------- strripos ----------- 166- int(8) 168- int(8) 170- int(8) 172- bool(false) 174- bool(false) 175+ Warning: strripos(): Offset is greater than the length of haystack string in %s/bug45923.php on line 8 176- 177- Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 178- bool(false) 179- > Offset: -1 180- int(8) 181- > Offset: -3 182- int(8) 183- > Offset: -6 184- int(4) 178+ ------- mb_strripos ----------- 181+ int(20) 183+ int(20) 185+ int(20) 186- 187+ int(20) 189+ int(20) 191+ int(20) 192+ > Offset: -1 193+ int(20) 194+ > Offset: -3 195+ int(20) 196+ > Offset: -6 197+ int(20) 199+ int(0) 187- Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 188- bool(false) 189- 190- ------- mb_strripos ----------- 191- 192- > Offset: 0 193- int(8) 194- > Offset: 3 195- int(8) 196- > Offset: 6 197- int(8) 198- > Offset: 9 199- bool(false) 200- > Offset: 11 201- bool(false) 202- > Offset: 12 203- 204- Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d 205- bool(false) 206- > Offset: -1 207- int(8) 208- > Offset: -3 209- int(8) 210- > Offset: -6 211- int(4) 212- > Offset: -20 213- 214- Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d 215- bool(false)