Bug in the Sample Code

1 post / 0 new
puravida's picture
puravida
Jedi Warrior
Offline
Joined: 09/01/2007
Visit puravida's Website

Hello All,

It was recently reported, and confirmed, that there was a bug in the sample code. It affected caching locally, in that everything was tagged as "nosave" and nothing would be cached. This resulted in a completely empty cache folder.

This bug was introduced as of 12.05.2013 and does NOT affect any of our supported plugins or integrations --as they were coded prior to the bug introduction. The only effect would be on custom integrations after that date. The bug has been corrected in the version of sample code available for download as of today's date.

For reference, here is the code that caused the failure to cache locally:

Starting at line 491 inside the stw_example_code.php:

// Pull response codes from XML feed
$aThumbnail = (array)$sXML->children($sXMLLayout)->Response->ThumbnailResult->Thumbnail[0];
$aResponse['thumbnail'] = $aThumbnail[0];
$aResponse['stw_action'] = $aThumbnail[1];

to

// Pull response codes from XML feed
$aResponse['thumbnail'] = $sXML->children($sXMLLayout)->Response->ThumbnailResult->Thumbnail[0];
$aResponse['stw_action'] = $sXML->children($sXMLLayout)->Response->ThumbnailResult->Thumbnail[1];

ShrinkTheWeb® (About STW) is another innovation by Neosys Consulting
Contact Us | PagePix Benefits | Learn More | STW Forums | Our Partners | Privacy Policy | Terms of Use

Announcing Javvy, the best crypto exchange and wallet solution (coming soon!)

©2018 ShrinkTheWeb. All rights reserved. ShrinkTheWeb is a registered trademark of ShrinkTheWeb.