I'm encountering a lot of difficulties in getting OzPost shipping module to work in v155.
Obvious signs of failure is the repeatable effect of wiping out checkbox options if they are changed, leading to an inability of the module to provide shipping estimates - in fact the options don't appear at all in the shopping cart or at checkout.
Before Update showing checked boxes
After Update showing all checkboxes have been cleared
Note that the radio button which was changed from No to Yes shows yes after updating as expected
Examination of the Configuration table shows that the checkboxes are represented in OzPost records as arrays and are set using this function, stored in the set function field for that record e.g.:
Code:
zen_cfg_select_multioption(array(
'Skippy Post Air',
'Skippy Post Air Insured',
'Skippy Post Air with Tracking',
'Skippy Post Air with Tracking and Insurance',
'Skippy Post Air +Proof of postage',
'Skippy Post Air Insured +Proof of postage',
'Skippy Post Air with Tracking +Proof of postage',
'Skippy Post Air with Tracking and Insurance +Proof of postage' ),
In v154 the Ozpost code works just fine but in v155 since at least January 13 it has been failing.
Logs created by an OzPost configuration update event show lots of entries like this:
Code:
[16-Feb-2016 00:14:08 Australia/Sydney] PHP Warning: htmlspecialchars() expects parameter 1 to be string, array given in /zc_154/nimrod/includes/classes/AdminRequestSanitizer.php on line 314
[16-Feb-2016 00:14:08 Australia/Sydney] PHP Stack trace:
[16-Feb-2016 00:14:08 Australia/Sydney] PHP 1. {main}() /zc_1545/nimrod/modules.php:0
[16-Feb-2016 00:14:08 Australia/Sydney] PHP 2. require() /zc_1545/nimrod/modules.php:10
[16-Feb-2016 00:14:08 Australia/Sydney] PHP 3. require() /zc_1545/nimrod/includes/application_top.php:171
[16-Feb-2016 00:14:08 Australia/Sydney] PHP 4. require() /zc_1545/includes/autoload_func.php:48
[16-Feb-2016 00:14:08 Australia/Sydney] PHP 5. AdminRequestSanitizer->runSanitizers() /zc_154/nimrod/includes/init_includes/init_sanitize.php:226
[16-Feb-2016 00:14:08 Australia/Sydney] PHP 6. AdminRequestSanitizer->processBuiltIn() /zc_154/nimrod/includes/classes/AdminRequestSanitizer.php:75
[16-Feb-2016 00:14:08 Australia/Sydney] PHP 7. call_user_func:{/zc_1545/nimrod/includes/classes/AdminRequestSanitizer.php:90}() /zc_154/nimrod/includes/classes/AdminRequestSanitizer.php:90
[16-Feb-2016 00:14:08 Australia/Sydney] PHP 8. AdminRequestSanitizer->filterStrictSanitizeValues() /zc_154/nimrod/includes/classes/AdminRequestSanitizer.php:90
[16-Feb-2016 00:14:08 Australia/Sydney] PHP 9. htmlspecialchars() /zc_1545/nimrod/includes/classes/AdminRequestSanitizer.php:314
[16-Feb-2016 00:14:08 Australia/Sydney] Request URI: /nimrod/modules.php?set=shipping&module=ozpost&action=save, IP address: fe80::226:8ff:fede:e711
#1 htmlspecialchars() called at [/zc_154/nimrod/includes/classes/AdminRequestSanitizer.php:314]
#2 AdminRequestSanitizer->filterStrictSanitizeValues()
#3 call_user_func() called at [/zc_154/nimrod/includes/classes/AdminRequestSanitizer.php:90]
#4 AdminRequestSanitizer->processBuiltIn() called at [/zc_1545/nimrod/includes/classes/AdminRequestSanitizer.php:75]
#5 AdminRequestSanitizer->runSanitizers() called at [/zc_1545/nimrod/includes/init_includes/init_sanitize.php:226]
#6 require(/zc_154/nimrod/includes/init_includes/init_sanitize.php) called at [/zc_154/includes/autoload_func.php:48]
#7 require(/zc_154/includes/autoload_func.php) called at [/zc_1545/nimrod/includes/application_top.php:171]
#8 require(/zc_154/nimrod/includes/application_top.php) called at [/zc_154/nimrod/modules.php:10]
The first line of the PHP Warning suggests that the sanitiser is being troubled by an array that it wasn't expecting.
Have I found the smoking gun?
I should add that this warning was generated by the v155 beta that contains the #828 fix.
All tests have been conducted on vanilla copies of v154 with only sample data and OzPost added, then upgrading to v155
Testing environment: MAMP Pro, PHP Version: 5.6.10 (Zend: 2.6.0), MySQL 5.5.42
Bookmarks