Hi,
In case anyone still uses this plugin, you will find below a fix for this error:
Notice: A non well formed numeric value encountered
Basically, the issue is that the plugin uses the same value both as an integer for substractions, and as a human-readable mark. that makes PHP v7.1+ show a Notice.
There are two places to fix in the Controller/Plugin/Debug/Plugin/Log.php file:
L120 should read:
$this->_marks[$name]['time'] = round((microtime(true)-$_SERVER['REQUEST_TIME'])*1000-(int)$this->_marks[$name]['time']).'ms';
L122 should read:
$this->_marks[$name]['memory'] = round((memory_get_usage()-(int)$this->_marks[$name]['memory'])/1024) . 'K';
This is admettedly an ugly fix. A better way could be to parse the value, preg_match it or even split the value in two, one for each purpose (calc or display).
Hi,
In case anyone still uses this plugin, you will find below a fix for this error:
Basically, the issue is that the plugin uses the same value both as an integer for substractions, and as a human-readable mark. that makes PHP v7.1+ show a Notice.
There are two places to fix in the
Controller/Plugin/Debug/Plugin/Log.phpfile:L120 should read:
$this->_marks[$name]['time'] = round((microtime(true)-$_SERVER['REQUEST_TIME'])*1000-(int)$this->_marks[$name]['time']).'ms';L122 should read:
$this->_marks[$name]['memory'] = round((memory_get_usage()-(int)$this->_marks[$name]['memory'])/1024) . 'K';This is admettedly an ugly fix. A better way could be to parse the value, preg_match it or even split the value in two, one for each purpose (calc or display).