File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,11 @@ public function detectFalsyFunction(): bool
128128 return true ;
129129 }
130130
131+ //used to detect get_headers and ldap_search
132+ if (preg_match ("/&false; on failure/m " , $ file )) {
133+ return true ;
134+ }
135+
131136 return false ;
132137 }
133138
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ public function testDetectFalsyFunction()
1919 $ mktime = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/datetime/functions/mktime.xml ' );
2020 $ date = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/datetime/functions/date.xml ' );
2121 $ classImplement = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/spl/functions/class-implements.xml ' );
22+ $ getHeaders = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/url/functions/get-headers.xml ' );
23+ $ ldapSearch = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/ldap/functions/ldap-search.xml ' );
2224
2325 $ this ->assertTrue ($ pregMatch ->detectFalsyFunction ());
2426 $ this ->assertFalse ($ implode ->detectFalsyFunction ());
@@ -31,6 +33,8 @@ public function testDetectFalsyFunction()
3133 $ this ->assertTrue ($ mktime ->detectFalsyFunction ());
3234 $ this ->assertTrue ($ date ->detectFalsyFunction ());
3335 $ this ->assertTrue ($ classImplement ->detectFalsyFunction ());
36+ $ this ->assertTrue ($ getHeaders ->detectFalsyFunction ());
37+ $ this ->assertTrue ($ ldapSearch ->detectFalsyFunction ());
3438 }
3539
3640 public function testDetectNullsyFunction ()
You can’t perform that action at this time.
0 commit comments