summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/reflection/php_reflection.c4
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperty_003.phpt20
-rw-r--r--ext/reflection/tests/ReflectionClass_getProperty_004.phpt20
-rw-r--r--ext/reflection/tests/ReflectionProperty_getValue_error.phpt2
-rw-r--r--ext/reflection/tests/ReflectionProperty_setAccessible.phpt14
-rw-r--r--ext/reflection/tests/ReflectionProperty_setValue_error.phpt2
-rw-r--r--ext/reflection/tests/bug37816.phpt2
7 files changed, 32 insertions, 32 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 7d8ea1c283..7a313813a9 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -5438,7 +5438,7 @@ ZEND_METHOD(reflection_property, getValue)
if (!(ref->prop.flags & (ZEND_ACC_PUBLIC | ZEND_ACC_IMPLICIT_PUBLIC)) && intern->ignore_visibility == 0) {
name = _default_load_name(getThis());
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Cannot access non-public member %s::%s", ZSTR_VAL(intern->ce->name), Z_STRVAL_P(name));
+ "Cannot access non-public member %s::$%s", ZSTR_VAL(intern->ce->name), Z_STRVAL_P(name));
return;
}
@@ -5489,7 +5489,7 @@ ZEND_METHOD(reflection_property, setValue)
if (!(ref->prop.flags & ZEND_ACC_PUBLIC) && intern->ignore_visibility == 0) {
name = _default_load_name(getThis());
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Cannot access non-public member %s::%s", ZSTR_VAL(intern->ce->name), Z_STRVAL_P(name));
+ "Cannot access non-public member %s::$%s", ZSTR_VAL(intern->ce->name), Z_STRVAL_P(name));
return;
}
diff --git a/ext/reflection/tests/ReflectionClass_getProperty_003.phpt b/ext/reflection/tests/ReflectionClass_getProperty_003.phpt
index 16c0c306ba..e30ea4abac 100644
--- a/ext/reflection/tests/ReflectionClass_getProperty_003.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperty_003.phpt
@@ -110,7 +110,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member C::protA
+Cannot access non-public member C::$protA
--- (Reflecting on privA) ---
Property privA does not exist
--- (Reflecting on pubB) ---
@@ -128,7 +128,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member C::protB
+Cannot access non-public member C::$protB
--- (Reflecting on privB) ---
Property privB does not exist
--- (Reflecting on pubC) ---
@@ -146,7 +146,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::protC
+Cannot access non-public member C::$protC
--- (Reflecting on privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -154,7 +154,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::privC
+Cannot access non-public member C::$privC
--- (Reflecting on doesntExist) ---
Property doesntExist does not exist
--- (Reflecting on A::pubC) ---
@@ -172,7 +172,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member A::protC
+Cannot access non-public member A::$protC
--- (Reflecting on A::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -180,7 +180,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member A::privC
+Cannot access non-public member A::$privC
--- (Reflecting on B::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -196,7 +196,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member B::protC
+Cannot access non-public member B::$protC
--- (Reflecting on B::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -204,7 +204,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member B::privC
+Cannot access non-public member B::$privC
--- (Reflecting on c::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -230,7 +230,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::protC
+Cannot access non-public member C::$protC
--- (Reflecting on C::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -238,7 +238,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::privC
+Cannot access non-public member C::$privC
--- (Reflecting on X::pubC) ---
Fully qualified property name X::pubC does not specify a base class of C
--- (Reflecting on X::protC) ---
diff --git a/ext/reflection/tests/ReflectionClass_getProperty_004.phpt b/ext/reflection/tests/ReflectionClass_getProperty_004.phpt
index 89335f42c4..e2bb6566ea 100644
--- a/ext/reflection/tests/ReflectionClass_getProperty_004.phpt
+++ b/ext/reflection/tests/ReflectionClass_getProperty_004.phpt
@@ -110,7 +110,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member C::protA
+Cannot access non-public member C::$protA
--- (Reflecting on privA) ---
Property privA does not exist
--- (Reflecting on pubB) ---
@@ -128,7 +128,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member C::protB
+Cannot access non-public member C::$protB
--- (Reflecting on privB) ---
Property privB does not exist
--- (Reflecting on pubC) ---
@@ -146,7 +146,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::protC
+Cannot access non-public member C::$protC
--- (Reflecting on privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -154,7 +154,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::privC
+Cannot access non-public member C::$privC
--- (Reflecting on doesntExist) ---
Property doesntExist does not exist
--- (Reflecting on A::pubC) ---
@@ -172,7 +172,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member A::protC
+Cannot access non-public member A::$protC
--- (Reflecting on A::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -180,7 +180,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "A"
}
-Cannot access non-public member A::privC
+Cannot access non-public member A::$privC
--- (Reflecting on B::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -196,7 +196,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member B::protC
+Cannot access non-public member B::$protC
--- (Reflecting on B::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -204,7 +204,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "B"
}
-Cannot access non-public member B::privC
+Cannot access non-public member B::$privC
--- (Reflecting on c::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -230,7 +230,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::protC
+Cannot access non-public member C::$protC
--- (Reflecting on C::privC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@@ -238,7 +238,7 @@ object(ReflectionProperty)#%d (2) {
["class"]=>
string(1) "C"
}
-Cannot access non-public member C::privC
+Cannot access non-public member C::$privC
--- (Reflecting on X::pubC) ---
Fully qualified property name X::pubC does not specify a base class of C
--- (Reflecting on X::protC) ---
diff --git a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
index 4efdef9c07..3bca85e4b6 100644
--- a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
@@ -75,7 +75,7 @@ Static property / wrong type of arg:
string(15) "static property"
Protected property:
-Cannot access non-public member TestClass::prot
+Cannot access non-public member TestClass::$prot
Invalid instance:
diff --git a/ext/reflection/tests/ReflectionProperty_setAccessible.phpt b/ext/reflection/tests/ReflectionProperty_setAccessible.phpt
index cc184c1920..fd82a47198 100644
--- a/ext/reflection/tests/ReflectionProperty_setAccessible.phpt
+++ b/ext/reflection/tests/ReflectionProperty_setAccessible.phpt
@@ -116,10 +116,10 @@ var_dump($protectedStatic->getValue());
var_dump($private->getValue($b));
?>
--EXPECT--
-string(44) "Cannot access non-public member A::protected"
-string(50) "Cannot access non-public member A::protectedStatic"
-string(42) "Cannot access non-public member A::private"
-string(48) "Cannot access non-public member A::privateStatic"
+string(45) "Cannot access non-public member A::$protected"
+string(51) "Cannot access non-public member A::$protectedStatic"
+string(43) "Cannot access non-public member A::$private"
+string(49) "Cannot access non-public member A::$privateStatic"
string(1) "a"
string(1) "b"
string(1) "c"
@@ -128,9 +128,9 @@ string(1) "e"
string(1) "f"
string(1) "g"
string(1) "h"
-string(44) "Cannot access non-public member B::protected"
-string(50) "Cannot access non-public member B::protectedStatic"
-string(42) "Cannot access non-public member A::private"
+string(45) "Cannot access non-public member B::$protected"
+string(51) "Cannot access non-public member B::$protectedStatic"
+string(43) "Cannot access non-public member A::$private"
string(1) "a"
string(1) "f"
string(1) "c"
diff --git a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt
index d5ecc7009f..0bf223daa7 100644
--- a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt
@@ -93,7 +93,7 @@ NULL
string(17) "Another new value"
Protected property:
-Cannot access non-public member TestClass::prot
+Cannot access non-public member TestClass::$prot
Instance without property:
NULL
diff --git a/ext/reflection/tests/bug37816.phpt b/ext/reflection/tests/bug37816.phpt
index f919b7424a..89ca3238b6 100644
--- a/ext/reflection/tests/bug37816.phpt
+++ b/ext/reflection/tests/bug37816.phpt
@@ -24,5 +24,5 @@ catch (Exception $e)
?>
===DONE===
--EXPECT--
-Caught: Cannot access non-public member TestClass::p
+Caught: Cannot access non-public member TestClass::$p
===DONE===