JoomGalleryfriends / JG4-dev

Development repository for JoomGallery v4.x
GNU General Public License v3.0
10 stars 6 forks source link

prevent php deprecated warning #133

Closed MrMusic closed 8 months ago

MrMusic commented 12 months ago

Fix PHP deprected warnings:

PHP Deprecated:  explode(): Passing null to parameter #2 ($string) of type string is deprecated in \administrator\components\com_joomgallery\src\Service\Filesystem\Filesystem.php on line 831
PHP Deprecated:  explode(): Passing null to parameter #2 ($string) of type string is deprecated in \administrator\components\com_joomgallery\src\Service\Filesystem\Filesystem.php on line 839
PHP Deprecated:  explode(): Passing null to parameter #2 ($string) of type string is deprecated in \administrator\components\com_joomgallery\src\Service\Filesystem\Filesystem.php on line 847

It tries to read values from the configuration that are not existent. The code is only commented out so that it can be easily reactivated later. See also https://github.com/JoomGalleryfriends/JG4-dev/pull/132#issuecomment-1705452052

reni68 commented 12 months ago

These messages no longer appear. :+1:

Elfangor93 commented 12 months ago

I don't like this approach of commenting out stuff to get rid of php warning.

It's just a warning and will not disturb any users since they will not have php error reporting to the maximum. But it helps the developer not to forget that there is an issue to be fixed. Therefore I propose o close this PR.

MrMusic commented 11 months ago

The testers are explicitly advised to set the error reporting to 'Maximum'. Therefore i would delete the unnecessary code.

Erftralle commented 8 months ago

I wonder if JoomGallery will also include the management of audio files, documents and videos in the stable release? To get rid of the warning you could just use an empty string as the default parameter instead of NULL.

MrMusic commented 8 months ago

I wonder if JoomGallery will also include the management of audio files, documents and videos in the stable release?

At the moment it is not planned. But i would like it if JoomGallery also supported videos (and others) at some time.

To get rid of the warning you could just use an empty string as the default parameter instead of NULL

Thanks I will try that.

@Erftralle It's very nice to see you here again

MrMusic commented 8 months ago

Changes to fix the deprecated message with an empty string instead to remove the code.

Elfangor93 commented 8 months ago

Thank you very much!