summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-09-21 14:17:06 +0000
committerAntony Dovgal <tony2001@php.net>2007-09-21 14:17:06 +0000
commitcecbe8765698f551bc7025dc3909a2899eae21bf (patch)
tree6b65d457089d0b1191e60b167c551ebeb803e92c
parent74ae13f933ca98e68de58b45d71b0d233a0a42e0 (diff)
downloadphp-git-cecbe8765698f551bc7025dc3909a2899eae21bf.tar.gz
MFH: add NULL check (coverity issue #385) and fix CS
-rw-r--r--Zend/zend_ini.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index 735981bed0..ab726c8d59 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -436,15 +436,14 @@ ZEND_INI_DISP(zend_ini_boolean_displayer_cb) /* {{{ */
if (tmp_value_len == 4 && strcasecmp(tmp_value, "true") == 0) {
value = 1;
- }
- else if (tmp_value_len == 3 && strcasecmp(tmp_value, "yes") == 0) {
+ } else if (tmp_value_len == 3 && strcasecmp(tmp_value, "yes") == 0) {
value = 1;
- }
- else if (tmp_value_len == 2 && strcasecmp(tmp_value, "on") == 0) {
+ } else if (tmp_value_len == 2 && strcasecmp(tmp_value, "on") == 0) {
value = 1;
- }
- else {
+ } else if (value) {
value = atoi(tmp_value);
+ } else {
+ value = 0;
}
if (value) {