Jump to content

PHP Warning: Security Warning: Illegal array


cpierrep

Recommended Posts

Hi folks

In the server-side error log I have the following error:

[17-Jul-2016 07:02:22 UTC] PHP Warning:  Security Warning: Illegal array key "amp;catId" was detected and was removed. in /home/cdbooks/public_html/classes/sanitize.class.php on line 72
 

The above has come up twice in the past week, as has:

14-Jul-2016 12:50:04 UTC] PHP Warning:  Security Warning: Illegal array key "amp;productId" was detected and was removed. in /home/cdbooks/public_html/classes/sanitize.class.php on line 72
 

Any suggestions for resolving this?

Link to comment
Share on other sites

The words 'catId' and 'productId' are used in the querystring part of a URL for CC3/4. The querystring part of a URL is everything after the question mark.

If you are now running CC6, there is code that will detect these words and convert them to CC5/6 style.

However, the amp; characters are being included in the querystring erroneously. CC6 is seeing &, parsing the & and leaving the amp;, where the semi-colon is an illegal character.

These are probably page requests from search engine crawlers.

It may be worthwhile for you, in your specific case having come from CC3/4, to add some code to specifically strip out amp; if it exists.

Or, another approach would be to send a 301 redirect when receiving a page request containing CC3/4 URLs.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...