]> granicus.if.org Git - php/commitdiff
Fix error reporting
authorStanislav Malyshev <stas@php.net>
Tue, 3 Jan 2017 05:59:44 +0000 (21:59 -0800)
committerStanislav Malyshev <stas@php.net>
Tue, 3 Jan 2017 05:59:44 +0000 (21:59 -0800)
ext/standard/var_unserializer.c
ext/standard/var_unserializer.re

index cb5d8662d6b583304847766f28618b012566c046..6f6f0e75d9830a76eaac85d9917cefdd4c4c578b 100644 (file)
@@ -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) {
index c5fe25d7274fdbfdcd9fa77bd04b8a70b1f7254f..b560479c03a6b9bbcc52817c4d9997924fb82795 100644 (file)
@@ -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) {