Bug #90087

Empty configuration values in indexed_search trigger PHP warning

Added by Andreas Fernandez 15 days ago. Updated 11 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-01-10
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The indexer of indexed_search crashes if numeric configurations have an empty string (=undefined).

Example:
if the option minAge is empty, the following warning occurs:

PHP Warning: A non-numeric value encountered in typo3/sysext/indexed_search/Classes/Indexer.php line 454

Associated revisions

Revision fe520c3f (diff)
Added by Andreas Fernandez 11 days ago

[BUGFIX] Cast indexer config to integers before multiplication

If either the options `minAge` or `maxAge` are an empty string, the
corresponding multiplication will fail and a PHP warning is triggered.

As a quick win, the values are casted to integers.

Resolves: #90087
Releases: master, 9.5, 8.7
Change-Id: Ia6861434231e7e338384c3e919a09466b39d425f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62846
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Tested-by: Daniel Goerz <>
Reviewed-by: Georg Ringer <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Jörg Bösche <>
Reviewed-by: Daniel Goerz <>

Revision 34a79461 (diff)
Added by Andreas Fernandez 11 days ago

[BUGFIX] Cast indexer config to integers before multiplication

If either the options `minAge` or `maxAge` are an empty string, the
corresponding multiplication will fail and a PHP warning is triggered.

As a quick win, the values are casted to integers.

Resolves: #90087
Releases: master, 9.5, 8.7
Change-Id: Ia6861434231e7e338384c3e919a09466b39d425f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62901
Tested-by: TYPO3com <>
Tested-by: Daniel Goerz <>
Reviewed-by: Daniel Goerz <>

Revision 67bd68cf (diff)
Added by Daniel Goerz 10 days ago

[BUGFIX] Cast indexer config to integers before multiplication

If either the options `minAge` or `maxAge` are an empty string, the
corresponding multiplication will fail and a PHP warning is triggered.

As a quick win, the values are casted to integers.

Resolves: #90087
Releases: master, 9.5, 8.7
Change-Id: Ia6861434231e7e338384c3e919a09466b39d425f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62881
Tested-by: TYPO3com <>
Tested-by: Daniel Goerz <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Sascha Rademacher <>
Reviewed-by: Daniel Goerz <>

History

#1 Updated by Gerrit Code Review 15 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/+/62846

#2 Updated by Gerrit Code Review 12 days ago

Patch set 2 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/+/62846

#3 Updated by Gerrit Code Review 11 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/+/62901

#4 Updated by Gerrit Code Review 11 days ago

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

#5 Updated by Andreas Fernandez 11 days ago

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

Also available in: Atom PDF