]> granicus.if.org Git - php/commitdiff
Remove no-op check for 'use strict;'
authorTyson Andre <tysonandre775@hotmail.com>
Thu, 28 Nov 2019 14:14:06 +0000 (09:14 -0500)
committerTyson Andre <tysonandre775@hotmail.com>
Thu, 28 Nov 2019 14:16:15 +0000 (09:16 -0500)
This should be checking for ZEND_SYMBOL_CLASS, not T_CLASS.

This was first added in 37ac1b96ed1

Zend/zend_compile.c

index fbbb5163f4e46b87bd351552c0993791519b3fe9..7e6b32e3400ccc6c6f999680992b78562ebadc73 100644 (file)
@@ -6830,11 +6830,6 @@ void zend_compile_use(zend_ast *ast) /* {{{ */
                                new_name = zend_string_copy(old_name);
 
                                if (!current_ns) {
-                                       if (type == T_CLASS && zend_string_equals_literal(new_name, "strict")) {
-                                               zend_error_noreturn(E_COMPILE_ERROR,
-                                                       "You seem to be trying to use a different language...");
-                                       }
-
                                        zend_error(E_WARNING, "The use statement with non-compound name '%s' "
                                                "has no effect", ZSTR_VAL(new_name));
                                }