projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- Fixed build on php-trunk
[m6w6/ext-http]
/
http_functions.c
diff --git
a/http_functions.c
b/http_functions.c
index 94b62bfa042b7cea2bcb20c93eb03b652c86afed..079996986697c361a73f6c6a9e6ce520d24db4cc 100644
(file)
--- a/
http_functions.c
+++ b/
http_functions.c
@@
-6,7
+6,7
@@
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-20
07
, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-20
10
, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
+--------------------------------------------------------------------+
*/
@@
-43,6
+43,7
@@
PHP_FUNCTION(http_date)
{
long t = -1;
PHP_FUNCTION(http_date)
{
long t = -1;
+ char *date;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &t) != SUCCESS) {
RETURN_FALSE;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &t) != SUCCESS) {
RETURN_FALSE;
@@
-52,7
+53,12
@@
PHP_FUNCTION(http_date)
t = HTTP_G->request.time;
}
t = HTTP_G->request.time;
}
- RETURN_STRING(http_date(t), 0);
+ if (!(date = http_date(t))) {
+ http_error_ex(HE_WARNING, HTTP_E_INVALID_PARAM, "Could not compose date of timestamp %ld", t);
+ RETURN_FALSE;
+ }
+
+ RETURN_STRING(date, 0);
}
/* }}} */
}
/* }}} */