]> granicus.if.org Git - php/commitdiff
Fix return value in zval_unicode_to_string_ex().
authorAndrei Zmievski <andrei@php.net>
Wed, 20 Dec 2006 20:43:31 +0000 (20:43 +0000)
committerAndrei Zmievski <andrei@php.net>
Wed, 20 Dec 2006 20:43:31 +0000 (20:43 +0000)
Zend/zend_unicode.c

index 5cfabc16b18a152c791945839a147236ad5e91ff..b0f1fec41a83df8b31e4e07dc8f01bef660a2f2c 100644 (file)
@@ -576,11 +576,11 @@ ZEND_API int zval_unicode_to_string_ex(zval *string, UConverter *conv TSRMLS_DC)
        if (zend_unicode_to_string(conv, &s, &s_len, u, u_len TSRMLS_CC) == SUCCESS) {
                ZVAL_STRINGL(string, s, s_len, 0);
                efree((UChar*)u);
-               return FAILURE;
+               return SUCCESS;
        } else {
                ZVAL_EMPTY_STRING(string);
                efree((UChar*)u);
-               return SUCCESS;
+               return FAILURE;
        }
 }
 /* }}} */