mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 12:28:46 +00:00
Basic logging for willMatchEverything #322
This commit is contained in:
@@ -12,6 +12,7 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Rules\Triggers;
|
||||
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class DescriptionEnds
|
||||
@@ -40,9 +41,16 @@ final class DescriptionEnds extends AbstractTrigger implements TriggerInterface
|
||||
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