summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2017-01-02 21:59:44 -0800
committerStanislav Malyshev <stas@php.net>2017-01-02 21:59:44 -0800
commitea6e54aff376926fb9ef83411f732b9477cf9b11 (patch)
treecb72ccb2a775bf6d103cbb5e54d953ce3ef55984
parenta6cdefe04353faf96f8a91fd8ef49f486bda7a7c (diff)
downloadphp-git-ea6e54aff376926fb9ef83411f732b9477cf9b11.tar.gz
Fix error reporting
-rw-r--r--ext/standard/var_unserializer.c4
-rw-r--r--ext/standard/var_unserializer.re4
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c
index cb5d8662d6..6f6f0e75d9 100644
--- a/ext/standard/var_unserializer.c
+++ b/ext/standard/var_unserializer.c
@@ -447,7 +447,7 @@ static inline zend_long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *
} else {
/* If this class implements Serializable, it should not land here but in object_custom(). The passed string
obviously doesn't descend from the regular serializer. */
- zend_error(E_WARNING, "Erroneous data format for unserializing '%s'", ce->name);
+ zend_error(E_WARNING, "Erroneous data format for unserializing '%s'", ZSTR_VAL(ce->name));
return -1;
}
@@ -514,7 +514,7 @@ PHPAPI int php_var_unserialize_ex(UNSERIALIZE_PARAMETER)
var_entries *orig_var_entries = (*var_hash)->last;
zend_long orig_used_slots = orig_var_entries ? orig_var_entries->used_slots : 0;
int result;
-
+
result = php_var_unserialize_internal(UNSERIALIZE_PASSTHRU);
if (!result) {
diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re
index c5fe25d727..b560479c03 100644
--- a/ext/standard/var_unserializer.re
+++ b/ext/standard/var_unserializer.re
@@ -451,7 +451,7 @@ static inline zend_long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *
} else {
/* If this class implements Serializable, it should not land here but in object_custom(). The passed string
obviously doesn't descend from the regular serializer. */
- zend_error(E_WARNING, "Erroneous data format for unserializing '%s'", ce->name);
+ zend_error(E_WARNING, "Erroneous data format for unserializing '%s'", ZSTR_VAL(ce->name));
return -1;
}
@@ -518,7 +518,7 @@ PHPAPI int php_var_unserialize_ex(UNSERIALIZE_PARAMETER)
var_entries *orig_var_entries = (*var_hash)->last;
zend_long orig_used_slots = orig_var_entries ? orig_var_entries->used_slots : 0;
int result;
-
+
result = php_var_unserialize_internal(UNSERIALIZE_PASSTHRU);
if (!result) {