Skip to content

Commit

Permalink
[TASK] Ensure compatibility with PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois Suter committed Sep 7, 2021
1 parent 4fc9f79 commit 6563d86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2021-09-07 Francois Suter (Idéative) <[email protected]>

* Ensure compatibility with PHP 8

2021-04-06 Francois Suter (Idéative) <[email protected]>

* Ensure compatibility with TYPO3 11, drop support for TYPO3 8 and 9
Expand Down
3 changes: 2 additions & 1 deletion Classes/Service/ConnectorBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ abstract public function fetchArray($parameters): array;
*/
public function postProcessOperations($parameters, $status)
{
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$this->extensionKey]['postProcessOperations'])) {
$hooks = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$this->extensionKey]['postProcessOperations'] ?? null;
if (is_array($hooks)) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$this->extensionKey]['postProcessOperations'] as $className) {
$processor = GeneralUtility::makeInstance($className);
$processor->postProcessOperations($parameters, $status, $this);
Expand Down
7 changes: 2 additions & 5 deletions Classes/Utility/FileUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,9 @@ public function getFileContent($uri, $headers = null)
$key = array_shift($uriParts);
$key = strtoupper($key);
// Check if a corresponding key exists
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['svconnector']['fileReader']) && array_key_exists(
$key,
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['svconnector']['fileReader']
)) {
$reader = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['svconnector']['fileReader'][$key] ?? null;
if ($reader) {
/** @var AbstractFileReader $readerObject */
$reader = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['svconnector']['fileReader'][$key];
$readerObject = GeneralUtility::makeInstance($reader, $this);
// Check inheritance and read data if okay
if ($readerObject instanceof AbstractFileReader) {
Expand Down

0 comments on commit 6563d86

Please sign in to comment.