diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2002-07-24 09:55:11 +0000 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2002-07-24 09:55:11 +0000 |
commit | 7b3fb771e4b022a8bf74b1a881dbec67d3ad460b (patch) | |
tree | e1201ac6178efe434b01e53be19e973c51a77a8d /ext/standard/incomplete_class.c | |
parent | 7df5113ef2e958da07bd7f914e4239a8a870bc9e (diff) | |
download | php-git-7b3fb771e4b022a8bf74b1a881dbec67d3ad460b.tar.gz |
is_object() returns FALSE if object is a "incomplete object".
Raise E_NOTICE, instead of E_ERROR, for setting/getting properties
to/from a "incomplete object".
Diffstat (limited to 'ext/standard/incomplete_class.c')
-rw-r--r-- | ext/standard/incomplete_class.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c index ee49154c17..ef0e2116c2 100644 --- a/ext/standard/incomplete_class.c +++ b/ext/standard/incomplete_class.c @@ -30,12 +30,10 @@ "you are trying to operate on was loaded _before_ " \ "the session was started" -#define INCOMPLETE_CLASS "__PHP_Incomplete_Class" -#define MAGIC_MEMBER "__PHP_Incomplete_Class_Name" /* {{{ incomplete_class_message */ -static void incomplete_class_message(zend_property_reference *ref) +static void incomplete_class_message(zend_property_reference *ref, int error_type) { char buf[1024]; char *class_name; @@ -49,7 +47,7 @@ static void incomplete_class_message(zend_property_reference *ref) efree(class_name); - php_error(E_ERROR, "%s", buf); + php_error(error_type, "%s", buf); } /* }}} */ @@ -57,7 +55,7 @@ static void incomplete_class_message(zend_property_reference *ref) */ static void incomplete_class_call_func(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference) { - incomplete_class_message(property_reference); + incomplete_class_message(property_reference, E_ERROR); } /* }}} */ @@ -65,7 +63,7 @@ static void incomplete_class_call_func(INTERNAL_FUNCTION_PARAMETERS, zend_proper */ static int incomplete_class_set_property(zend_property_reference *property_reference, zval *value) { - incomplete_class_message(property_reference); + incomplete_class_message(property_reference, E_NOTICE); /* does not reach this point */ return (0); @@ -78,7 +76,7 @@ static zval incomplete_class_get_property(zend_property_reference *property_refe { zval foo; - incomplete_class_message(property_reference); + incomplete_class_message(property_reference, E_NOTICE); /* does not reach this point */ memset(&foo, 0, sizeof(zval)); /* shut warnings up */ |