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

index 87ead12e3a0de9fb992e20efd248663cd96fa77e..500c3c88790035e72d2cadea2668535b7596cbae 100644 (file)
@@ -544,7 +544,8 @@ ZEND_FUNCTION(get_class)
                if (EG(scope)) {
                        RETURN_STRINGL(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) {