Making PHPStan happy
This commit is contained in:
parent
1961d423a7
commit
a88f703367
|
@ -0,0 +1 @@
|
|||
tags
|
|
@ -290,10 +290,11 @@ class jzonParser
|
|||
++$this->c;
|
||||
}
|
||||
|
||||
$str_num = substr($this->in, $start, $this->c - $start);
|
||||
if($is_float)
|
||||
$out = 1*substr($this->in, $start, $this->c - $start);
|
||||
$out = floatval($str_num);
|
||||
else
|
||||
$out = (int)(1*substr($this->in, $start, $this->c - $start));
|
||||
$out = intval($str_num);
|
||||
}
|
||||
|
||||
private function parse_true(&$out)
|
||||
|
@ -340,7 +341,7 @@ function jzon_parse($str)
|
|||
return $res;
|
||||
|
||||
//NOTE: only allowing extension implementation if versions match
|
||||
if(JZON_EXT_VERSION === JZON_VERSION)
|
||||
if(defined('JZON_EXT_VERSION') && JZON_EXT_VERSION === JZON_VERSION)
|
||||
{
|
||||
list($ok, $err, $err_pos, $res) = jzon_parse_c($str);
|
||||
if(!$ok)
|
||||
|
|
Loading…
Reference in New Issue