jilo-web/app/helpers/errors.php

15 lines
319 B
PHP
Raw Normal View History

2024-08-17 08:20:08 +00:00
<?php
function getError($message, $error = '', $environment = null) {
global $config;
$environment = $config['environment'] ?? 'production';
if ($environment === 'production') {
return 'There was an unexpected error. Please try again.';
} else {
return $error ?: $message;
}
}
?>