release 0.7.1 _ Fix php < 8 _ thanks @Gvx- _ closes #5

This commit is contained in:
Jean-Christian Denis 2021-11-08 21:42:01 +01:00
parent 166ac1b00e
commit 06793ce4b4
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
3 changed files with 11 additions and 5 deletions

View file

@ -18,7 +18,7 @@ $this->registerModule(
'improve',
'Tiny tools to fix things for module devs',
'Jean-Christian Denis and contributors',
'0.7',
'0.7.1',
[
'requires' => [['core', '2.19']],
'permissions' => null,

View file

@ -2,10 +2,10 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="improve">
<name>improve</name>
<version>0.7</version>
<version>0.7.1</version>
<author>Jean-Christian Denis and contributors</author>
<desc>Tiny tools to fix things for module devs</desc>
<file>https://github.com/JcDenis/improve/releases/download/v0.7/plugin-improve.zip</file>
<file>https://github.com/JcDenis/improve/releases/download/v0.7.1/plugin-improve.zip</file>
<da:dcmin>2.19</da:dcmin>
<da:details>https://github.com/JcDenis/improve</da:details>
<da:support>https://github.com/JcDenis/improve</da:support>

View file

@ -295,7 +295,13 @@ class Improve
return $this->core->adminurl->get('admin.plugin.improve', $params, '&');
}
public static function cleanExtensions(string|array $in): array
/**
* Check and clean file extension
*
* @param string|array $in Extension(s) to clean
* @return array Cleaned extension(s)
*/
public static function cleanExtensions($in): array
{
$out = [];
if (!is_array($in)) {
@ -405,7 +411,7 @@ class ImproveDefinition
*
* @return boolean Success
*/
private function registerModule(string $name, string $desc, string $author, string $version, string|array $properties = []): bool // @phpstan-ignore-line
private function registerModule(string $name, string $desc, string $author, string $version, $properties = []): bool // @phpstan-ignore-line
{
if (!is_array($properties)) {
$args = func_get_args();