Skip to content

Commit

Permalink
CustomerFileNotFoundException now checks existence of App\Environment…
Browse files Browse the repository at this point in the history
… so it is working correctly on splited packages
  • Loading branch information
TomasLudvik committed Nov 14, 2024
1 parent c2b61bd commit bcbbb5c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CustomerFileNotFoundException extends CustomerFileException
*/
public function __construct($message = '', ?Exception $previous = null)
{
$isDev = Environment::getEnvironment() === EnvironmentType::DEVELOPMENT;
$isDev = class_exists('App\Environment') && Environment::getEnvironment() === EnvironmentType::DEVELOPMENT;

if (!$isDev) {
throw new NotFoundHttpException($message, $previous, 0, ['X-Accel-Redirect' => '@storefront']);
Expand Down

0 comments on commit bcbbb5c

Please sign in to comment.