From d2f323a563be0ea95210af0bcb62edcb1722dd12 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Fri, 5 Jun 2026 02:05:17 +0300 Subject: [PATCH] Deploy on 2026-06-05 02:05:17 --- app/Core/Container.php | 25 +++++++++++++------------ resources/views/errors/500.php | 8 ++++---- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/Core/Container.php b/app/Core/Container.php index f005e37..ff748b1 100644 --- a/app/Core/Container.php +++ b/app/Core/Container.php @@ -38,20 +38,21 @@ class Container implements ContainerInterface return $this->instances[$id]; } - if (!$this->has($id)) { - return $this->resolve($id); + if (isset($this->bindings[$id])) { + $binding = $this->bindings[$id]; + $concrete = $binding['concrete']; + + $object = $this->resolve($concrete); + + if ($binding['singleton']) { + $this->instances[$id] = $object; + } + + return $object; } - $binding = $this->bindings[$id]; - $concrete = $binding['concrete']; - - $object = $this->resolve($concrete); - - if ($binding['singleton']) { - $this->instances[$id] = $object; - } - - return $object; + // Not bound, auto-resolve using Reflection + return $this->resolve($id); } /** diff --git a/resources/views/errors/500.php b/resources/views/errors/500.php index a2cb747..4a06819 100644 --- a/resources/views/errors/500.php +++ b/resources/views/errors/500.php @@ -10,15 +10,15 @@
500

System Server Error

-

escape($message) : 'A critical exception has occurred on the application server.' ?>

+

-escape($exception->getMessage()) ?>
-in escape($exception->getFile()) ?>:getLine() ?>
+getMessage(), ENT_QUOTES, 'UTF-8') ?>
+in getFile(), ENT_QUOTES, 'UTF-8') ?>:getLine() ?>
 
-escape($exception->getTraceAsString()) ?>
+getTraceAsString(), ENT_QUOTES, 'UTF-8') ?>
             
Return Home