]> granicus.if.org Git - php/commitdiff
no need to throw E_ERROR here, E_WARNING is more than enough
authorAntony Dovgal <tony2001@php.net>
Tue, 27 Jun 2006 19:58:27 +0000 (19:58 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 27 Jun 2006 19:58:27 +0000 (19:58 +0000)
Zend/zend_builtin_functions.c

index c2ddb73ea90eaa5c5b0288587aefc7838fe01722..3d79c97f6ddc93758a65972d917f391eaed2a2c2 100644 (file)
@@ -588,7 +588,8 @@ ZEND_FUNCTION(get_class)
                if (EG(scope)) {
                        RETURN_TEXTL(EG(scope)->name, EG(scope)->name_length, 1);
                } else {
-                       zend_error(E_ERROR, "get_class() called without object from outside a class");
+                       zend_error(E_WARNING, "get_class() called without object from outside a class");
+                       RETURN_FALSE;
                }
        }
        if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {