| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2007, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
STR_FREE(decoded);
updated_len += decoded_len;
RETVAL_STRINGL(updated, updated_len, 0);
- } else {
+ } else if (decoded) {
STR_FREE(updated);
RETVAL_STRINGL(decoded, decoded_len, 0);
+ } else {
+ RETVAL_NULL();
}
} else {
STR_FREE(updated);