Skip to content

Commit

Permalink
3.0.2
Browse files Browse the repository at this point in the history
Suppress notice Deprecated: json_decode(): Passing null..
  • Loading branch information
conseilgouz committed Apr 3, 2024
1 parent cf2ffaa commit d31a601
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion admin/cggallery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<authorUrl>www.conseilgouz.com</authorUrl>
<copyright>Copyright (C) 2024 ConseilGouz.com. All Rights Reserved</copyright>
<license>GNU/GPL Version 3 or later - https://www.gnu.org/licenses/gpl-3.0.html</license>
<version>3.0.1</version>
<version>3.0.2</version>
<namespace path="src">ConseilGouz\Component\CGGallery</namespace>
<description>CG_GAL_XML_DESCRIPTION</description>
<install>
Expand Down
2 changes: 1 addition & 1 deletion cggallery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<authorUrl>www.conseilgouz.com</authorUrl>
<copyright>Copyright (C) 2024 ConseilGouz.com. All Rights Reserved</copyright>
<license>GNU/GPL Version 3 or later - https://www.gnu.org/licenses/gpl-3.0.html</license>
<version>3.0.1</version>
<version>3.0.2</version>
<namespace path="src">ConseilGouz\Component\CGGallery</namespace>
<description>CG_GAL_XML_DESCRIPTION</description>
<install>
Expand Down
11 changes: 11 additions & 0 deletions com_cggallery_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<changelogs>
<changelog>
<element>com_cggallery</element>
<type>component</type>
<version>3.0.2</version>
<note>
<item>Update : 03/04/2024</item>
</note>
<fix>
<item>Suppress notice Deprecated: json_decode(): Passing null..</item>
</fix>
</changelog>
<changelog>
<element>com_cggallery</element>
<type>component</type>
Expand Down
7 changes: 5 additions & 2 deletions site/tmpl/page/default.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @component CG Gallery
* Version : 2.4.8
* Version : 3.0.2
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @copyright (c) 2024 ConseilGouz. All Rights Reserved.
* @author ConseilGouz
Expand Down Expand Up @@ -99,7 +99,10 @@
}
// from https://digitaldisseny.com/en/blog/96-joomla-jfolder-filter-for-file-extensions
$filter = null;
$allowedExtensions = json_decode($this->cgg_params->get('imgtypes'));
$allowedExtensions = null;
if ($this->cgg_params->get('imgtypes')) {
$allowedExtensions = json_decode($this->cgg_params->get('imgtypes'));
}
if ($allowedExtensions) {
$allowedExtensions = array_merge($allowedExtensions, array_map('strtoupper', $allowedExtensions));
// Build the filter. Will return something like: "jpg|png|JPG|PNG|gif|GIF"
Expand Down

0 comments on commit d31a601

Please sign in to comment.