From: Antony Dovgal Date: Fri, 21 Sep 2007 14:16:39 +0000 (+0000) Subject: add NULL check (coverity issue #385) and fix CS X-Git-Tag: RELEASE_2_0_0a1~1768 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=285330fd3173a8713749d1657b13e1437980bb4e;p=php add NULL check (coverity issue #385) and fix CS --- diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 244cd4e34c..617d79c12f 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -429,15 +429,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) {