Skip to content

Commit

Permalink
Fixed instance without construct in solution
Browse files Browse the repository at this point in the history
  • Loading branch information
solital committed Aug 13, 2024
1 parent b235803 commit 7feff2b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Released Notes

## v3.3.2 - (2024-08-13)

### Fixed

- Fixed instance without construct in solution

--------------------------------------------------------------------------

## v3.3.1 - (2024-08-03)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/ModernPHPException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ModernPHPException
{
use HelpersTrait, HandlerAssetsTrait, RenderTrait;

public const VERSION = "3.3.1";
public const VERSION = "3.3.2";

/**
* @var Bench
Expand Down
3 changes: 2 additions & 1 deletion src/Trait/RenderTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ private function getLines(string $context, int $line): self
private function renderSolutionCli(): void
{
if (isset($this->info_error_exception['type_exception'])) {
$exception = new $this->info_error_exception['namespace_exception']();
$reflection = new \ReflectionClass($this->info_error_exception['namespace_exception']);
$exception = $reflection->newInstanceWithoutConstructor();

if (method_exists($exception, "getSolution")) {
$exception->getSolution();
Expand Down

0 comments on commit 7feff2b

Please sign in to comment.