| 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(encoded);
updated_len += encoded_len;
RETURN_STRINGL(updated, updated_len, 0);
- } else {
+ } else if (encoded) {
RETVAL_STRINGL(encoded, encoded_len, 0);
+ } else {
+ RETVAL_NULL();
}
} else {
RETVAL_FALSE;