1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00
This commit is contained in:
Ilia Alshanetsky
2002-09-29 15:55:11 +00:00
parent 1142e16075
commit 2af630f87d

View File

@@ -463,6 +463,11 @@ static char *php_session_encode(int *newlen TSRMLS_DC)
{
char *ret = NULL;
if (!PS(http_session_vars)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot encode non-existent session.");
return NULL;
}
if (PS(serializer)->encode(&ret, newlen TSRMLS_CC) == FAILURE)
ret = NULL;
@@ -1318,6 +1323,10 @@ PHP_FUNCTION(session_encode)
}
enc = php_session_encode(&len TSRMLS_CC);
if (enc == NULL) {
RETURN_FALSE;
}
RETVAL_STRINGL(enc, len, 0);
}
/* }}} */