cvs: php4 /main main.c
| From: | Derick Rethans | Date: | Wed, 17 Jul 2002 08:06:44 +0000 |
| Subject: | cvs: php4 /main main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12866@lists.php.net to get a copy of this message | ||
derick Wed Jul 17 04:06:44 2002 EDT
Modified files:
/php4/main main.c
Log:
- set_time_limit() now returns whether it succeeded in changing the time
limit.
Index: php4/main/main.c
diff -u php4/main/main.c:1.466 php4/main/main.c:1.467
--- php4/main/main.c:1.466 Thu Jul 11 21:49:58 2002
+++ php4/main/main.c Wed Jul 17 04:06:43 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.466 2002/07/12 01:49:58 sniper Exp $ */
+/* $Id: main.c,v 1.467 2002/07/17 08:06:43 derick Exp $ */
/* {{{ includes
*/
@@ -542,7 +542,7 @@
}
/* }}} */
-/* {{{ proto void set_time_limit(int seconds)
+/* {{{ proto bool set_time_limit(int seconds)
Sets the maximum time a script can run */
PHP_FUNCTION(set_time_limit)
{
@@ -558,7 +558,11 @@
}
convert_to_string_ex(new_timeout);
- zend_alter_ini_entry("max_execution_time", sizeof("max_execution_time"),
Z_STRVAL_PP(new_timeout), Z_STRLEN_PP(new_timeout), PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
+ if (zend_alter_ini_entry("max_execution_time", sizeof("max_execution_time"),
Z_STRVAL_PP(new_timeout), Z_STRLEN_PP(new_timeout), PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == SUCCESS)
{
+ RETURN_TRUE;
+ } else {
+ RETURN_FALSE;
+ }
}
/* }}} */