Skip to content

Commit

Permalink
ORMDebugManager Error Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredrick Peter committed Sep 20, 2023
1 parent 01ef74b commit dec6ae8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Capsule/DebugManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DebugManager{

use ReusableTrait;

private static $whoops;
public static $whoops;

/**
* Boot the DebugManager.
Expand All @@ -25,7 +25,7 @@ public static function boot()
{
if(!defined('ORMDebugManager')){
self::autoStartDebugger();
define('ORMDebugManager', self::$whoops);
define('ORMDebugManager', 1);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/Schema/Traits/BuilderTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
use Closure;
use DateTime;
use Exception;
use HTMLPurifier;
use DateTimeInterface;
use builder\Database\Capsule\Forge;
use builder\Database\Schema\Builder;
use builder\Database\Schema\Expression;
use builder\Database\Schema\JoinClause;
use builder\Database\Schema\Pagination\Paginator;
use builder\Database\Collections\Collection;
use builder\Database\Capsule\DebugManager;
use builder\Database\Schema\BuilderCompiler;
use builder\Database\Collections\Collection;
use builder\Database\Schema\Pagination\Paginator;


/**
Expand Down Expand Up @@ -1392,7 +1392,7 @@ protected function totalQueryDuration()
protected function errorException(mixed $exception)
{
if($this->manager::AppDebug()){
ORMDebugManager->handleException(
DebugManager::$whoops->handleException(
new \PDOException($exception->getMessage(), (int) $exception->getCode(), $exception),
);
}
Expand Down

0 comments on commit dec6ae8

Please sign in to comment.