aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/ExtensionException.php
diff options
context:
space:
mode:
authorGravatar Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> 2023-07-07 21:53:17 +0200
committerGravatar GitHub <noreply@github.com> 2023-07-07 21:53:17 +0200
commit7f9594b8c7d7799f2e5f89328bd5981410db8cf0 (patch)
tree67614f8f3d04e94139d19dad3dd438f3bd949368 /lib/Minz/ExtensionException.php
parent1db606bc1b6cf25d9b9c4bef362acdb964ce1e8a (diff)
fix many "Only booleans are allowed in an if condition" (#5501)
* fix many "Only booleans are allowed in an if condition" * Update cli/create-user.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update cli/i18n/I18nUsageValidator.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Fix several regressions and other minor things * Fix another regression * Update lib/http-conditional.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'lib/Minz/ExtensionException.php')
-rw-r--r--lib/Minz/ExtensionException.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Minz/ExtensionException.php b/lib/Minz/ExtensionException.php
index c5bba60a9..730730c1d 100644
--- a/lib/Minz/ExtensionException.php
+++ b/lib/Minz/ExtensionException.php
@@ -1,8 +1,8 @@
<?php
class Minz_ExtensionException extends Minz_Exception {
- public function __construct(string $message, ?string $extension_name = null, int $code = self::ERROR) {
- if ($extension_name) {
+ public function __construct(string $message, string $extension_name = '', int $code = self::ERROR) {
+ if ($extension_name !== '') {
$message = 'An error occurred in `' . $extension_name . '` extension with the message: ' . $message;
} else {
$message = 'An error occurred in an unnamed extension with the message: ' . $message;