]> granicus.if.org Git - php/commitdiff
- Make this work in unicode mode
authorMarcus Boerger <helly@php.net>
Sun, 17 Dec 2006 23:23:33 +0000 (23:23 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 17 Dec 2006 23:23:33 +0000 (23:23 +0000)
# Well of course i should have set the return type to ascii here :-)

ext/spl/spl_observer.c
ext/spl/tests/observer_003.phpt

index dc99cf900d05e7133ab3e7ef214a8e098581e4b7..ad02d69e82d21a9dfa20362409e8630f5076282d 100755 (executable)
@@ -304,7 +304,7 @@ SPL_METHOD(SplObjectStorage, serialize)
        PHP_VAR_SERIALIZE_DESTROY(var_hash);
 
        if (buf.c) {
-               RETURN_STRINGL(buf.c, buf.len, 0);
+               RETURN_ASCII_STRINGL(buf.c, buf.len, 0);
        } else {
                RETURN_NULL();
        }
index 7f3cd219b86bad7c8a27d0d2b478b8670bf1c1e0..6d3ed9d3fff1fa65b04be4678e9168aad992499e 100755 (executable)
@@ -56,3 +56,16 @@ string(1) "2"
 string(3) "foo"
 bool(true)
 ===DONE===
+--UEXPECT--
+int(4)
+int(1)
+unicode(1) "2"
+unicode(3) "foo"
+bool(true)
+===UNSERIALIZE===
+int(4)
+int(1)
+unicode(1) "2"
+unicode(3) "foo"
+bool(true)
+===DONE===