From 4bac10bb428149dbadcaafbdd97431b1bf11d987 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Wed, 1 Dec 2021 10:58:23 +0900 Subject: [PATCH] Bug fix for checks, bug fix in config other, test host Add test host soba-dev.tequila.jp, others will be added config.other had errors with double define a constant Supress phan/phpstan errors for ...array calls in methods --- www/configs/config.host.php | 9 +++++++++ www/configs/config.other.php | 1 + www/lib/CoreLibs/Basic.php | 2 +- www/lib/CoreLibs/Debug/Logging.php | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/www/configs/config.host.php b/www/configs/config.host.php index beaadab1..e5d491d2 100755 --- a/www/configs/config.host.php +++ b/www/configs/config.host.php @@ -23,6 +23,14 @@ declare(strict_types=1); // 'login_enabled' => true // ]; +$__LOCAL_CONFIG = [ + 'db_host' => 'test', + 'location' => 'test', + 'debug_flag' => true, + 'site_lang' => 'en_utf8', + 'login_enabled' => true +]; + // each host has a different db_host $SITE_CONFIG = [ // development host @@ -42,6 +50,7 @@ $SITE_CONFIG = [ 'login_enabled' => true ], // 'other.host.com' => $__LOCAL_CONFIG + 'soba-dev.tequila.jp' => $__LOCAL_CONFIG ]; // __END__ diff --git a/www/configs/config.other.php b/www/configs/config.other.php index 9d0dedaa..37a4bd11 100755 --- a/www/configs/config.other.php +++ b/www/configs/config.other.php @@ -24,6 +24,7 @@ foreach ($paths as $path) { if (file_exists($path . DS . 'convert') && is_file($path . DS . 'convert')) { // image magick convert location define('CONVERT', $path . DS . 'convert'); + break; } } unset($paths); diff --git a/www/lib/CoreLibs/Basic.php b/www/lib/CoreLibs/Basic.php index 52dc404a..464097a4 100644 --- a/www/lib/CoreLibs/Basic.php +++ b/www/lib/CoreLibs/Basic.php @@ -281,7 +281,7 @@ class Basic public function debugFor(string $type, string $flag): void { trigger_error('Method ' . __METHOD__ . ' is deprecated, use $basic->log->debugFor() or use \CoreLibs\Debug\Logging() class', E_USER_DEPRECATED); - /** @phan-suppress-next-line PhanTypeMismatchArgumentReal @phpstan-ignore-next-line */ + /** @phan-suppress-next-line PhanTypeMismatchArgumentReal, PhanParamTooFew @phpstan-ignore-next-line */ $this->log->debugFor(...[func_get_args()]); } diff --git a/www/lib/CoreLibs/Debug/Logging.php b/www/lib/CoreLibs/Debug/Logging.php index e9da49e4..f95aa8ad 100644 --- a/www/lib/CoreLibs/Debug/Logging.php +++ b/www/lib/CoreLibs/Debug/Logging.php @@ -369,7 +369,7 @@ class Logging */ public function debugFor(string $type, string $flag): void { - /** @phan-suppress-next-line PhanTypeMismatchArgumentReal @phpstan-ignore-next-line */ + /** @phan-suppress-next-line PhanTypeMismatchArgumentReal, PhanParamTooFew @phpstan-ignore-next-line */ $this->setLogLevel(...[func_get_args()]); }