Skip to content

Commit fa9d680

Browse files
committed
Expand detection of falsy functions to add getcwd
The documentation for getcwd states: “Returns the current working directory on success, or FALSE on failure.” Support detection for “on failure” in addition to “on error”.
1 parent a67db72 commit fa9d680

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

generator/src/DocPage.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ public function detectFalsyFunction(): bool
3131
if (preg_match('/&false;\s+on\s+error/m', $file)) {
3232
return true;
3333
}
34+
if (preg_match('/&false;\s+on\s+failure/m', $file)) {
35+
return true;
36+
}
3437
if (preg_match('/&false;\s+if\s+an\s+error\s+occurred/m', $file)) {
3538
return true;
3639
}

0 commit comments

Comments
 (0)