From 5d8661fd278b23806876fbade3bb62929228b226 Mon Sep 17 00:00:00 2001 From: eldadfux Date: Sat, 28 Sep 2019 22:30:56 +0300 Subject: [PATCH] Better structure error --- src/Database/Validator/Structure.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Database/Validator/Structure.php b/src/Database/Validator/Structure.php index 3f60d812be..407fbcf064 100644 --- a/src/Database/Validator/Structure.php +++ b/src/Database/Validator/Structure.php @@ -187,8 +187,12 @@ class Structure extends Validator if (empty($validator)) { // Error creating validator for property $this->message = 'Unknown rule type "' . $ruleType . '" for property "' . htmlspecialchars($key, ENT_QUOTES, 'UTF-8') . '"'; - // $this->message = 'Unknown property "'.$key.'" type'. - // '. Make sure to follow '.strtolower($collection->getAttribute('name', 'unknown')).' collection structure'; + + if(empty($ruleType)) { + $this->message = 'Unknown property "'.$key.'" type'. + '. Make sure to follow '.strtolower($collection->getAttribute('name', 'unknown')).' collection structure'; + } + return false; }