Skip to content

Commit

Permalink
Add error log to HaloRenderer's render method
Browse files Browse the repository at this point in the history
This is a NOTICE message for when HalModule is unintentionally installed and you are not aware of it.
  • Loading branch information
koriym committed Apr 20, 2024
1 parent d44c7aa commit 66f5ea5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Halo/HaloRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use function array_walk_recursive;
use function assert;
use function error_log;
use function explode;
use function get_class;
use function highlight_string;
Expand Down Expand Up @@ -63,6 +64,8 @@ public function __construct(
public function render(ResourceObject $ro)
{
if (! $this->isEableHalo()) {
error_log('Debug: ?_halo=1 query enables Halo. See https://bearsunday.github.io/manuals/1.0/en/html.html');

return $this->renderer->render($ro);
}

Expand Down

0 comments on commit 66f5ea5

Please sign in to comment.