Skip to content
Snippets Groups Projects
Commit f2e4e838 authored by Florian Rival's avatar Florian Rival Committed by Stefan Bürk
Browse files

[BUGFIX] Avoid returning invalid return type in AbstractOEmbedHelper

"AbstractOEmbedHelper::getOEmbedData()" requests data and
decode it as json. json_decode() may fail and thus having
a invalid type decoded. In the complete chain this lead to
a "access array offset on value type bool" warning.

This patch checks the decoded value before returning, thus
ensure valid return type is "array" or "null". Furthermore
this avoids a signature change of the corresponding method
"AbstractOEmbedHelper::getOEmbedData()". Additionally this
paves the way for adding proper return type in a dedicated
patch. Streamline usage in VimeoHelper along the way.

Resolves: #97428
Releases: main, 11.5
Change-Id: Icda6b2baa88ddcbf070ceae75eafcb2e9ccb41f1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74467


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent 68c9b545
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment