This repository was archived by the owner on Jan 29, 2020. It is now read-only.
File tree 7 files changed +8
-8
lines changed
7 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ class PatternOptions extends AbstractOptions
152
152
public function __construct ($ options = null )
153
153
{
154
154
// disable file/directory permissions by default on windows systems
155
- if (0 === stripos (PHP_OS , 'WIN ' )) {
155
+ if (stripos (PHP_OS , 'WIN ' ) === 0 ) {
156
156
$ this ->filePermission = false ;
157
157
$ this ->dirPermission = false ;
158
158
}
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ public function clearByNamespace($namespace)
229
229
$ recheck = false ;
230
230
$ internalKey = dba_firstkey ($ this ->handle );
231
231
while ($ internalKey !== false && $ internalKey !== null ) {
232
- if (0 === strpos ($ internalKey , $ prefix )) {
232
+ if (strpos ($ internalKey , $ prefix ) === 0 ) {
233
233
$ result = dba_delete ($ internalKey , $ this ->handle ) && $ result ;
234
234
}
235
235
@@ -267,7 +267,7 @@ public function clearByPrefix($prefix)
267
267
$ recheck = false ;
268
268
$ internalKey = dba_firstkey ($ this ->handle );
269
269
while ($ internalKey !== false && $ internalKey !== null ) {
270
- if (0 === strpos ($ internalKey , $ prefix )) {
270
+ if (strpos ($ internalKey , $ prefix ) === 0 ) {
271
271
$ result = dba_delete ($ internalKey , $ this ->handle ) && $ result ;
272
272
$ recheck = true ;
273
273
}
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ class FilesystemOptions extends AdapterOptions
119
119
public function __construct ($ options = null )
120
120
{
121
121
// disable file/directory permissions by default on windows systems
122
- if (0 === stripos (PHP_OS , 'WIN ' )) {
122
+ if (stripos (PHP_OS , 'WIN ' ) === 0 ) {
123
123
$ this ->filePermission = false ;
124
124
$ this ->dirPermission = false ;
125
125
}
Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ public function getLibOptions($id)
332
332
$ reflection = new ReflectionClass ('Memcached ' );
333
333
$ constants = $ reflection ->getConstants ();
334
334
foreach ($ constants as $ constName => $ constValue ) {
335
- if (0 === strpos ($ constName , 'OPT_ ' )) {
335
+ if (strpos ($ constName , 'OPT_ ' ) === 0 ) {
336
336
$ libOptions [$ constValue ] = $ resource ->getOption ($ constValue );
337
337
}
338
338
}
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ public function clearByPrefix($prefix)
205
205
206
206
$ data = & $ this ->data [$ ns ];
207
207
foreach ($ data as $ key => & $ item ) {
208
- if (0 === strpos ($ key , $ prefix )) {
208
+ if (strpos ($ key , $ prefix ) === 0 ) {
209
209
unset($ data [$ key ]);
210
210
}
211
211
}
Original file line number Diff line number Diff line change @@ -492,7 +492,7 @@ public function getLibOptions($id)
492
492
$ reflection = new ReflectionClass ('Redis ' );
493
493
$ constants = $ reflection ->getConstants ();
494
494
foreach ($ constants as $ constName => $ constValue ) {
495
- if (0 === strpos ($ constName , 'OPT_ ' )) {
495
+ if (strpos ($ constName , 'OPT_ ' ) === 0 ) {
496
496
$ libOptions [$ constValue ] = $ resource ['resource ' ]->getOption ($ constValue );
497
497
}
498
498
}
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ public function clearByPrefix($prefix)
124
124
125
125
$ data = $ cntr ->offsetGet ($ ns );
126
126
foreach ($ data as $ key => & $ item ) {
127
- if (0 === strpos ($ key , $ prefix )) {
127
+ if (strpos ($ key , $ prefix ) === 0 ) {
128
128
unset($ data [$ key ]);
129
129
}
130
130
}
You can’t perform that action at this time.
0 commit comments