trigger_error -> error_log

This commit is contained in:
2022-10-11 12:17:30 -03:00
parent 8a03d9e675
commit e4cec2e2f2

View File

@ -70,7 +70,6 @@ abstract class Repository implements RepositoryInterface
return $this->properties ?? $this->getColumns();
}
public function setConnection(Connection $connection): Repository
{
$this->connection = $connection;
@ -228,10 +227,10 @@ abstract class Repository implements RepositoryInterface
try {
$value = $model->{$getter}();
if ($this->validateDefaultProperty($value)) {
trigger_error("{$property} has default value in " . get_called_class());
error_log("Notice: {$property} has default value in " . get_called_class());
}
} catch (\Error | \Exception $e) {
trigger_error("Missing {$property} in data for " . get_called_class() . "::fillData", E_USER_WARNING);
error_log("Warning: Missing {$property} in data for " . get_called_class() . "::fillData");
}
}
return $model;
@ -245,7 +244,7 @@ abstract class Repository implements RepositoryInterface
foreach ($this->getRequiredColumns() as $column) {
$m = $this->getMethod($column);
if (!method_exists($model, $m)) {
trigger_error("Missing getter for {$column} in " . get_called_class() . "::mapArray", E_USER_WARNING);
error_log("Warning: Missing getter for {$column} in " . get_called_class() . "::mapArray");
continue;
}
if (!isset($data[$column])) {