Forums / Bug Reports / When offline: Illegal string offset 'versionMajor'

When offline: Illegal string offset 'versionMajor'

Views: 6,896

Results 1 to 3 of 3
24 Jan 2018, 11:16 PM
#1
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

When offline: Illegal string offset 'versionMajor'

ZC1.5.5f new install development
xampp
- Apache 2.4.25
- PHP 7.1.1
- MariaDB 10.1.21

More of a annoyance, then a bug.. If you're in development or for some reason zen-cart is not pingable, $newVersionInfo returns a string and not an array! The results is error logs with php warnings of Illegal string offset.

PHP Warning:  Illegal string offset 'versionMajor' in /public_html/admin/includes/classes/VersionServer.php on line 77

The return is an error string string(56) "{"error":"Couldn't resolve host 'ping.zen-cart.com'[6]"}" instead of the expected array ```
array(7) { ["versionMajor"]=> string(1) "1"......


Or is there an off switch I didn't find yet?

Dave
Always forward thinking... Lost my mind!

24 Jan 2018, 11:32 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: When offline: Illegal string offset 'versionMajor'

Your "off switch" for local/offline development is in /admin/includes/local/skip_version_check.ini, line 2.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Jan 2018, 4:44 PM
#3
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: When offline: Illegal string offset 'versionMajor'

DrByte:

Your "off switch" for local/offline development is in /admin/includes/local/skip_version_check.ini, line 2.

And the file name says it all.. :eek:

Thanks..

Dave
Always forward thinking... Lost my mind!