Bug #91882

ShowImageController throws PHP warning because of #91509

Added by Stefan P 16 days ago. Updated 3 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2020-07-29
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Due to #91509 the ShowImageController throws a PHP warning about invalid foreach arguments when old links are called (for example when search crawlers still request it), because the json_decode fails.


Related issues

Related to TYPO3 Core - Task #91509: Switch to json_encode for tx_cms_showpic parameters Resolved 2020-05-27

Associated revisions

Revision 603f42b6 (diff)
Added by Oliver Bartsch 3 days ago

[BUGFIX] Ensure decoded parameters are a valid array

Calling ShowImageController with old links containing serialized
parameters leads to PHP warnings as the json_decode doesn't
return an array in this case.

To prevent this warnings we now ensure that parameters is a valid
array in any case, prior to calling the foreach.

Resolves: #91882
Releases: master, 10.4, 9.5
Change-Id: If33068f4f69bd858ff130ca4f31970df8fa1d624
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65137
Tested-by: Stefan P <>
Tested-by: TYPO3com <>
Tested-by: Oliver Hader <>
Reviewed-by: Stefan P <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Oliver Hader <>

Revision b8b16e1e (diff)
Added by Oliver Bartsch 3 days ago

[BUGFIX] Ensure decoded parameters are a valid array

Calling ShowImageController with old links containing serialized
parameters leads to PHP warnings as the json_decode doesn't
return an array in this case.

To prevent this warnings we now ensure that parameters is a valid
array in any case, prior to calling the foreach.

Resolves: #91882
Releases: master, 10.4, 9.5
Change-Id: If33068f4f69bd858ff130ca4f31970df8fa1d624
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65241
Tested-by: TYPO3com <>
Tested-by: Oliver Hader <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Oliver Hader <>

Revision dda201fa (diff)
Added by Oliver Bartsch 3 days ago

[BUGFIX] Ensure decoded parameters are a valid array

Calling ShowImageController with old links containing serialized
parameters leads to PHP warnings as the json_decode doesn't
return an array in this case.

To prevent this warnings we now ensure that parameters is a valid
array in any case, prior to calling the foreach.

Resolves: #91882
Releases: master, 10.4, 9.5
Change-Id: If33068f4f69bd858ff130ca4f31970df8fa1d624
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65242
Tested-by: TYPO3com <>
Tested-by: Oliver Hader <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Oliver Hader <>

History

#1 Updated by Stefan P 16 days ago

  • Related to Task #91509: Switch to json_encode for tx_cms_showpic parameters added

#2 Updated by Stefan P 16 days ago

This spams our logs on a several-hundreds domain setup.

#3 Updated by Gerrit Code Review 16 days ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65137

#4 Updated by Gerrit Code Review 3 days ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65241

#5 Updated by Gerrit Code Review 3 days ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65242

#6 Updated by Oliver Bartsch 3 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF