mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Basic logging for willMatchEverything #322
This commit is contained in:
@@ -13,6 +13,7 @@ namespace FireflyIII\Rules\Triggers;
|
||||
|
||||
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class DescriptionContains
|
||||
@@ -41,9 +42,16 @@ final class DescriptionContains extends AbstractTrigger implements TriggerInterf
|
||||
public static function willMatchEverything($value = null)
|
||||
{
|
||||
if (!is_null($value)) {
|
||||
return strval($value) === '';
|
||||
$res = strval($value) === '';
|
||||
if ($res === true) {
|
||||
Log::error(sprintf('Cannot use %s with "" as a value.', self::class));
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
Log::error(sprintf('Cannot use %s with a null value.', self::class));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user