This commit is contained in:
Antony Dovgal 2006-12-21 01:18:28 +00:00
parent 1783b0e481
commit 6aec52bde7
2 changed files with 6 additions and 3 deletions

View File

@ -948,7 +948,8 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot yet handle MBCS!");
return 0;
efree(ret);
return NULL;
}
if (php_memnstr(ret, entity, entity_length, ret+retlen)) {
@ -1308,7 +1309,10 @@ PHP_FUNCTION(html_entity_decode)
}
replaced = php_unescape_html_entities(str, str_len, &len, 1, quote_style, hint_charset TSRMLS_CC);
RETVAL_STRINGL(replaced, len, 0);
if (replaced) {
RETURN_STRINGL(replaced, len, 0);
}
RETURN_FALSE;
}
/* }}} */

View File

@ -673,7 +673,6 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, cha
if ((stream = php_stream_temp_create_rel(0, ~0u)) != NULL) {
/* store data */
php_stream_temp_write(stream, comma, ilen TSRMLS_CC);
efree(comma);
php_stream_temp_seek(stream, 0, SEEK_SET, &newoffs TSRMLS_CC);
/* set special stream stuff (enforce exact mode) */
vlen = strlen(mode);