From: Marcus Boerger Date: Sun, 17 Dec 2006 23:23:33 +0000 (+0000) Subject: - Make this work in unicode mode X-Git-Tag: RELEASE_1_0_0RC1~675 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e02a15a625958be77f2c81b20d60987a9c8e4354;p=php - Make this work in unicode mode # Well of course i should have set the return type to ascii here :-) --- diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index dc99cf900d..ad02d69e82 100755 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -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(); } diff --git a/ext/spl/tests/observer_003.phpt b/ext/spl/tests/observer_003.phpt index 7f3cd219b8..6d3ed9d3ff 100755 --- a/ext/spl/tests/observer_003.phpt +++ b/ext/spl/tests/observer_003.phpt @@ -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===