I just upgraded my site to php7.3 x-cart version 4.7.11 and am having an issue with Shipstation not posting back the tracking info. I get an error
Quote:
Warning: A non-numeric value encountered in /home/uscandle/public_html.dev/include/func/func.logging.php on line 534
|
Here is the function in question from func.logging.php...
Code:
function func_array_compare($orig, $new)
{
$result = array (
'removed' => false,
'added' => false,
'delta' => false,
'changed' => false
);
$keys = array();
if (is_array($orig)) $keys = array_keys($orig);
if (is_array($new)) $keys = array_merge($keys, array_keys($new));
$keys = array_unique($keys);
foreach ($keys as $key) {
$in_orig = isset($orig[$key]);
$in_new = isset($new[$key]);
if ($in_orig && !$in_new) {
$result['removed'][$key] = $orig[$key];
}
elseif (!$in_orig && $in_new) {
$result['added'][$key] = $new[$key];
}
else {
// check for changed values
if (!is_array($new[$key])) {
if (!strcmp((string)$orig[$key], (string)$new[$key])) {
continue;
}
$is_numeric = preg_match('!^((\d+)|(\d+\.\d+))$!S', $new[$key]);
if ($is_numeric) {
$result['delta'][$key] = $new[$key] - $orig[$key]; <------------- Line 534
}
$result['changed'][$key] = $new[$key];
}
else {
$tmp = func_array_compare($orig[$key],$new[$key]);
foreach ($tmp as $tmp_key=>$tmp_value) {
if ($tmp_value === false) continue;
$result[$tmp_key][$key] = $tmp_value;
}
}
}
}
// remove not used arrays
foreach ($result as $k=>$v) {
if ($v === false)
unset($result[$k]);
}
return $result;
}
and then I also get this warning as well...
Quote:
Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /home/uscandle/public_html/include/sessions.php on line 75
|
here is the code for sessions.php
Code:
* PHP build-in sessions tuning (for type '1' & '2')
*/
// PHP 4.3.0 and higher allow to turn off trans-sid using this command:
ini_set('url_rewriter.tags','');
// Let's garbage collection will occurs more frequently
ini_set('session.gc_probability',90); <-------------------Line 75
ini_set('session.gc_divisor',100); // for PHP >= 4.3.0
ini_set('session.use_cookies', false);
Any idea how to fix these errors?
Thanks.