Skip to content

Commit 2f27d5b

Browse files
committed
Merge branch '4.4' into 5.4
* 4.4: [Console] Fix `Helper::removeDecoration` hyperlink bug Guard scripts from being run in non-CLI contexts a readonly property must not be reported as being writable
2 parents eb59000 + e4964c7 commit 2f27d5b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Resources/bin/generate_operator_regex.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
if ('cli' !== \PHP_SAPI) {
13+
throw new Exception('This script must be run from the command line.');
14+
}
15+
1216
$operators = ['not', '!', 'or', '||', '&&', 'and', '|', '^', '&', '==', '===', '!=', '!==', '<', '>', '>=', '<=', 'not in', 'in', '..', '+', '-', '~', '*', '/', '%', 'matches', '**'];
1317
$operators = array_combine($operators, array_map('strlen', $operators));
1418
arsort($operators);

0 commit comments

Comments
 (0)