]> granicus.if.org Git - php/commitdiff
Improve errormessage on wrong use statements
authorHannes Magnusson <bjori@php.net>
Tue, 16 Aug 2011 10:46:49 +0000 (10:46 +0000)
committerHannes Magnusson <bjori@php.net>
Tue, 16 Aug 2011 10:46:49 +0000 (10:46 +0000)
Zend/zend_compile.c

index 943c5e49918f6288e46cacd5b2839da44e1c4a06..9e673b854d4df6171b74c8e996822b70a85cf8f0 100644 (file)
@@ -6647,6 +6647,9 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{
                zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because the name is already in use", Z_STRVAL_P(ns), Z_STRVAL_P(name));
        }
        if (warn) {
+               if (!strcmp(Z_STRVAL_P(name), "strict")) {
+                       zend_error(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", Z_STRVAL_P(name));
        }
        efree(lcname);