Osclass forums

Support forums => General help => 3.8.x => Topic started by: Aficionado on September 26, 2018, 08:51:29 am

Title: PHP Notice & Warning : A non well formed numeric value
Post by: Aficionado on September 26, 2018, 08:51:29 am
PHP Notice:  A non well formed numeric value encountered in /home/oc-includes/osclass/ItemActions.php on line 1285

PHP Warning:  A non-numeric value encountered in /home/oc-includes/osclass/ItemActions.php on line 1285


PHP 7.1.x

Not sure if it comes from the core or a plugin ?
Title: Re: PHP Notice & Warning : A non well formed numeric value
Post by: WEBmods on September 26, 2018, 03:59:01 pm
Hello,

Seems like an error in core, when formatting the price:

Code: [Select]
<?php
            
if( !is_null($aItem['price']) ) {
                
$price str_replace(osc_locale_thousands_sep(), ''trim($aItem['price']));
                
$price str_replace(osc_locale_dec_point(), '.'$price);
                
$aItem['price'] = $price*1000000;
                
//$aItem['price'] = (float) $aItem['price'];

            
}
?>


Is it possible that a non-numeric value was inserted in price field?

Regards.
Title: Re: PHP Notice & Warning : A non well formed numeric value
Post by: Aficionado on September 26, 2018, 04:11:55 pm
Hello, I have no idea. Just saw a few in the debug.log of one site.