edit_orders.php - Non Numeric error in editing orders
[Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]
zen 1.5.5f - php 7.1
anyone ever seen this error (fake admin address):
[02-Dec-2018 00:34:13 UTC] Request URI: /adminxxxxxx/edit_orders.php?page=1&oID=243424&action=update_order, IP address: 160.3.207.42
#1 zen_round() called at [/home/honor/public_html/includes/classes/currencies.php:94]
#2 currencies->value() called at [/home/honor/public_html/adminxxxxxx/includes/classes/editOrders.php:436]
#3 editOrders->eoRoundCurrencyValue() called at [/home/honor/public_html/adminxxxxxx/includes/classes/editOrders.php:441]
#4 editOrders->eoFormatCurrencyValue() called at [/home/honor/public_html/adminxxxxxx/edit_orders.php:475]
[02-Dec-2018 00:34:13 UTC] PHP Warning: A non-numeric value encountered in /home/honor/public_html/adminxxxxxx/includes/functions/general.php on line 1783
Re: Non Numeric error in editing orders
What modifications are applied to that file as line 1783 does not have anything "numeric" to apply: https://github.com/zencart/zencart/b...eral.php#L1783
Otherwise as far as seeing an error something like that, sure, occurs more often when strict error reporting is enabled and some data is not "cleansed" sufficiently.
Re: Non Numeric error in editing orders
Edit Orders is a mod. Please post to their support thread:
https://www.zen-cart.com/showthread....Support-Thread
Re: Non Numeric error in editing orders
Quote:
Originally Posted by
mc12345678
What modifications are applied to that file as line 1783 does not have anything "numeric" to apply:
https://github.com/zencart/zencart/b...eral.php#L1783
Otherwise as far as seeing an error something like that, sure, occurs more often when strict error reporting is enabled and some data is not "cleansed" sufficiently.
where is this set?? "strict error reporting is enabled"
Re: Non Numeric error in editing orders
Quote:
Originally Posted by
swguy
how could you tell that it is coming from that mod???
Re: Non Numeric error in editing orders
Quote:
Originally Posted by
lidlchris
how could you tell that it is coming from that mod???
Request URI tells you the file being used. edit_orders.php is not part of Zen Cart; it's a mod.
Quote:
Originally Posted by
lidlchris
where is this set?? "strict error reporting is enabled"
I'm not sure if MC# meant "PHP error reporting" or "MySQL Error reporting". I still don't know what's on the failing LOC you reported.
If DB:
admin/includes/configure.php (and catalog side includes/configure.php). After
define('DB_DATABASE', 'your-db-name');
add
define('DB_MYSQL_MODE', 'NO_ENGINE_SUBSTITUTION');
This will disable strict error reporting in MySQL.
If PHP: it's set in admin/includes/extra_configures/enable_error_logging.php
Re: Non Numeric error in editing orders
Quote:
I'm not sure if MC# meant "PHP error reporting" or "MySQL Error reporting". I still don't know what's on the failing LOC you reported.
If DB:
admin/includes/configure.php (and catalog side includes/configure.php). After
define('DB_DATABASE', 'your-db-name');
add
define('DB_MYSQL_MODE', 'NO_ENGINE_SUBSTITUTION');
This will disable strict error reporting in MySQL.
If PHP: it's set in admin/includes/extra_configures/enable_error_logging.php
i really don't know what this means?? i can't add anything to the cart on this site now..
Re: Non Numeric error in editing orders
Quote:
Originally Posted by
mc12345678
What modifications are applied to that file as line 1783 does not have anything "numeric" to apply:
https://github.com/zencart/zencart/b...eral.php#L1783
Otherwise as far as seeing an error something like that, sure, occurs more often when strict error reporting is enabled and some data is not "cleansed" sufficiently.
Quote:
Originally Posted by
lidlchris
where is this set?? "strict error reporting is enabled"
Quote:
Originally Posted by
lidlchris
I'm not sure if MC# meant "PHP error reporting" or "MySQL Error reporting". I still don't know what's on the failing LOC you reported.
If DB:
admin/includes/configure.php (and catalog side includes/configure.php). After
define('DB_DATABASE', 'your-db-name');
add
define('DB_MYSQL_MODE', 'NO_ENGINE_SUBSTITUTION');
This will disable strict error reporting in MySQL.
If PHP: it's set in admin/includes/extra_configures/enable_error_logging.php
i really don't know what this means?? i can't add anything to the cart on this site now..
Most of the detail of these posts address strict error reporting and how it is often or likely forceably applied within Zen Cart (though it could be applied outside of Zen Cart by the host).
LOC = Line Of Concern.
In admin/includes/functions/general.php there has been an error reported on line 1783 as reported in the OP (as used here Original Post) but we don't have a clue what YOUR line 1783 contains. I provided a link to what a default version of ZC has for line 1783. So how is yours different in that area?
Re: Non Numeric error in editing orders
Quote:
Originally Posted by
mc12345678
LOC = Line Of Concern.
LOL. LOC = Line of Code.
Re: Non Numeric error in editing orders
Quote:
Originally Posted by
mc12345678
Most of the detail of these posts address strict error reporting and how it is often or likely forceably applied within Zen Cart (though it could be applied outside of Zen Cart by the host).
LOC = Line Of Concern.
In admin/includes/functions/general.php there has been an error reported on line 1783 as reported in the OP (as used here Original Post) but we don't have a clue what YOUR line 1783 contains. I provided a link to what a default version of ZC has for line 1783. So how is yours different in that area?
sorry i'm so new and bad at this but i CAN understand advanced instructions if clear. Here is the coding around line 1783:
HTML Code:
function zen_cfg_pull_down_zone_classes($zone_class_id, $key = '') {
global $db;
$name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');
$zone_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
$zone_class = $db->Execute("select geo_zone_id, geo_zone_name
from " . TABLE_GEO_ZONES . "
order by geo_zone_name");
while (!$zone_class->EOF) {
$zone_class_array[] = array('id' => $zone_class->fields['geo_zone_id'],
'text' => $zone_class->fields['geo_zone_name']);
$zone_class->MoveNext();
}
return zen_draw_pull_down_menu($name, $zone_class_array, $zone_class_id);
}
actual line 1783 is
HTML Code:
return zen_draw_pull_down_menu($name, $zone_class_array, $zone_class_id);