Bug #90449

Wrong key calculation in Admin panel QueryInformation

Added by Tymoteusz Motylewski about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
AdminPanel
Target version:
-
Start date:
2020-02-20
Due date:
% Done:

100%

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

Description

the line

$identifier = sha1($query['sql']) . sha1(implode(',', $query['backtrace']));

in TYPO3\CMS\Adminpanel\Modules\Debug\QueryInformation
throws a notice "array to string conversion" and does not do what it should, because $query['backtrace'] is an 2 level array, so after implode the string is "Array, Array, Array" - see screenshot.

query_info.png View (205 KB) Tymoteusz Motylewski, 2020-02-20 10:36


Related issues

Related to TYPO3 Core - Bug #90458: Several places in the core throw php notices Under Review 2020-02-20

Associated revisions

Revision f8145d61 (diff)
Added by Susanne Moog about 1 month ago

[BUGFIX] Use json_encode instead of implode

To ensure unique identifiers for query entries the
backtrace is considered as part of the hash. As the
backtrace is multidimensional, stringification is no
longer done by using implode.

Resolves: #90449
Releases: master, 9.5
Change-Id: I920591c8c3df99aea5a2362c416e938b425e32a3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63351
Tested-by: Daniel Goerz <>
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Daniel Goerz <>
Reviewed-by: Andreas Fernandez <>

Revision 2e97e0c4 (diff)
Added by Susanne Moog about 1 month ago

[BUGFIX] Use json_encode instead of implode

To ensure unique identifiers for query entries the
backtrace is considered as part of the hash. As the
backtrace is multidimensional, stringification is no
longer done by using implode.

Resolves: #90449
Releases: master, 9.5
Change-Id: I920591c8c3df99aea5a2362c416e938b425e32a3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63299
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Reviewed-by: Susanne Moog <>

History

#1 Updated by Tymoteusz Motylewski about 1 month ago

  • Description updated (diff)

#2 Updated by Nikita Hovratov about 1 month ago

  • Related to Bug #90458: Several places in the core throw php notices added

#3 Updated by Daniel Goerz about 1 month ago

  • Description updated (diff)

#4 Updated by Gerrit Code Review about 1 month 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/+/63351

#5 Updated by Gerrit Code Review about 1 month 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/+/63299

#6 Updated by Susanne Moog about 1 month ago

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

#7 Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF