aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2025-04-09 08:35:56 +0200
committerJoas Schilling <coding@schilljs.com>2025-04-09 08:35:56 +0200
commit8358a7f769c6bab897b8593baaf37e76024ead82 (patch)
tree08eb59d282de0164105f5cca0db8ddfddecfdae6 /lib
parentedeccc897f9994abeba6a7246349662ac22f2936 (diff)
downloadnextcloud-server-revert/52035.tar.gz
nextcloud-server-revert/52035.zip
Revert "refactor(RichObjectStrings): Only log error if key or value is not string in validator"revert/52035
This reverts commit fd156d3408a030c6bb98d9cdaf3790375d766eb5. Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/RichObjectStrings/Validator.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/RichObjectStrings/Validator.php b/lib/private/RichObjectStrings/Validator.php
index d7f824f2948..adc4a8710f7 100644
--- a/lib/private/RichObjectStrings/Validator.php
+++ b/lib/private/RichObjectStrings/Validator.php
@@ -10,8 +10,6 @@ namespace OC\RichObjectStrings;
use OCP\RichObjectStrings\Definitions;
use OCP\RichObjectStrings\InvalidObjectExeption;
use OCP\RichObjectStrings\IValidator;
-use OCP\Server;
-use Psr\Log\LoggerInterface;
/**
* Class Validator
@@ -81,10 +79,10 @@ class Validator implements IValidator {
foreach ($parameter as $key => $value) {
if (!is_string($key)) {
- Server::get(LoggerInterface::class)->error('Object for placeholder ' . $placeholder . ' is invalid, key ' . $key . ' is not a string');
+ throw new InvalidObjectExeption('Object for placeholder ' . $placeholder . ' is invalid, key ' . $key . ' is not a string');
}
if (!is_string($value)) {
- Server::get(LoggerInterface::class)->error('Object for placeholder ' . $placeholder . ' is invalid, value ' . $value . ' for key ' . $key . ' is not a string');
+ throw new InvalidObjectExeption('Object for placeholder ' . $placeholder . ' is invalid, value ' . $value . ' for key ' . $key . ' is not a string');
}
}
}