tony2001 Fri Sep 21 14:12:52 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/main main.c
Log:
MFH: check for NULL (coverity issue #386)
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.55&r2=1.640.2.23.2.56&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.55 php-src/main/main.c:1.640.2.23.2.56
--- php-src/main/main.c:1.640.2.23.2.55 Thu Sep 13 20:04:22 2007
+++ php-src/main/main.c Fri Sep 21 14:12:52 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.640.2.23.2.55 2007/09/13 20:04:22 stas Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.56 2007/09/21 14:12:52 tony2001 Exp $ */
/* {{{ includes
*/
@@ -229,11 +229,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