summaryrefslogtreecommitdiff
path: root/ext/standard/incomplete_class.c
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2002-07-24 09:55:11 +0000
committerYasuo Ohgaki <yohgaki@php.net>2002-07-24 09:55:11 +0000
commit7b3fb771e4b022a8bf74b1a881dbec67d3ad460b (patch)
treee1201ac6178efe434b01e53be19e973c51a77a8d /ext/standard/incomplete_class.c
parent7df5113ef2e958da07bd7f914e4239a8a870bc9e (diff)
downloadphp-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.c12
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 */