tony2001 Fri Sep 21 14:11:45 2007 UTC
Modified files:
/php-src/main main.c
Log:
check for NULL (coverity issue #386)
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.747&r2=1.748&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.747 php-src/main/main.c:1.748
--- php-src/main/main.c:1.747 Thu Sep 13 20:06:15 2007
+++ php-src/main/main.c Fri Sep 21 14:11:45 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.747 2007/09/13 20:06:15 stas Exp $ */
+/* $Id: main.c,v 1.748 2007/09/21 14:11:45 tony2001 Exp $ */
/* {{{ includes
*/
@@ -348,11 +348,13 @@
mode = PHP_DISPLAY_ERRORS_STDERR;
} else if (value_length == 6 && !strcasecmp(value, "stdout")) {
mode = PHP_DISPLAY_ERRORS_STDOUT;
- } else {
+ } else if (value ){
mode = atoi(value);
if (mode && mode != PHP_DISPLAY_ERRORS_STDOUT && mode !=
PHP_DISPLAY_ERRORS_STDERR) {
mode = PHP_DISPLAY_ERRORS_STDOUT;
}
+ } else {
+ mode = PHP_DISPLAY_ERRORS_STDOUT;
}
return mode;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php