andersundsehr / aus_driver_amazon_s3

Provides a TYPO3 FAL driver for the Amazon Web Service S3
GNU Lesser General Public License v3.0
20 stars 39 forks source link

PHP warning "Creating default object from empty value" #81

Closed Moongazer closed 10 months ago

Moongazer commented 3 years ago

Working with this extension results occasionally in the following entry inside the TYPO3 error-log:

 Core: Error handler (FE): PHP Warning: Creating default object from empty value in .../typo3conf/ext/aus_driver_amazon_s3/Classes/Driver/AmazonS3Driver.php line 1087 

Since its only a warning, it isn't bad or break the functionality. But it fills up the error-log over time. Unfortunately I could not debug it to gather more information, because I don't know how to reliable reproduce it. Also the line itself does not help me:

$GLOBALS['TSFE']->additionalHeaderData['ausDriverAmazonS3_dnsPrefetch'] = '<link rel="dns-prefetch" href="' . $this->baseUrl . '">';

I will keep an eye on it and provide more details if I can.

Edit 2021-09-13: It seems the error occurs only if BE users which are not admins working on S3 (e.g. uploading content).

PHP 7.4 TYPO3 10.4.15 aus_driver_amazon_s3 1.11.1

Lagerregal commented 10 months ago

Hi @Moongazer, do you know if this issue occurs with the latest TYPO3 versions 11 and 12?

Moongazer commented 10 months ago

@Lagerregal at the moment I'm not ready upgrading to v11, with the project where this extension is used. But I will check and provide some details as soon as I can, also if this issue is obsolete in newer versions.

Moongazer commented 10 months ago

@Lagerregal I just tested the current version (1.12.1) installed in TYPO3 v11.5.30 (PHP 8.1) and used a non-admin BE user to perform some S3 file-actions (upload, rename, delete). Non of these actions created a log-entry anymore.

Also this test was not reliable as I'm not sure how to reproduce the error in the first place, it seems that it is done for now working with the newer versions. So if you don't mind, I will close this issue for now.