Zen Cart 1.5.4 PHP 5.6, Image Handler, Zen Lightbox, Edit Orders, Easy Populate, third party template M***n
Log folder is getting lots of these every day:
[17-Jan-2021 22:24:50 America/New_York] PHP Warning: file_get_contents(http://www.zen-cart.com/downloads.ph...check&id=170): failed to open stream: HTTP request failed! HTTP/1.1 503 Service Temporarily Unavailable
in /home/MYSITE/public_html/MYCART/includes/functions/plugin_support.php on line 38
[17-Jan-2021 22:24:50 America/New_York] PHP Warning: in_array() expects parameter 2 to be array, null given in /home/eMYSITE/public_html/MYCART/includes/functions/plugin_support.php on line 42
Looks like it's trying to find info on Plug In 170 but nothing there?
Here are lines 32 to 44 of my plugin_support.php file:
function plugin_version_check_for_updates($plugin_file_id = 0, $version_string_to_compare = '')
{
if ($plugin_file_id == 0) return FALSE;
$new_version_available = FALSE;
$lookup_index = 0;
$url = 'http://www.zen-cart.com/downloads.php?do=versioncheck' . '&id='.(int)$plugin_file_id;
$data = json_decode(file_get_contents($url), true);
// compare versions
if (strcmp($data[$lookup_index]['latest_plugin_version'], $version_string_to_compare) > 0) $new_version_available = TRUE;
// check whether present ZC version is compatible with the latest available plugin version
if (!in_array('v'. PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR, $data[$lookup_index]['zcversions'])) $new_version_available = FALSE;
return ($new_version_available) ? $data[$lookup_index] : FALSE;
}
Advice, fixes greatly appreciated.
Thanks, Ted
Bookmarks