Skip to content

Commit

Permalink
Ensure constant is set in debug helper
Browse files Browse the repository at this point in the history
  • Loading branch information
nateweller committed Oct 8, 2024
1 parent c6d1508 commit e789c15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion projects/plugins/debug-helper/modules/class-waf-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @package automattic/jetpack-debug-helper
*/

use Automattic\Jetpack\Waf\Waf_Constants;
use Automattic\Jetpack\Waf\Waf_Rules_Manager;
use Automattic\Jetpack\Waf\Waf_Runner;

Expand Down Expand Up @@ -223,7 +224,8 @@ public function render_ui() {
<hr>

<h2>Rules Entrypoint</h2>
<?php $this->render_waf_file( defined( 'JETPACK_WAF_ENTRYPOINT' ) && JETPACK_WAF_ENTRYPOINT ); ?>
<?php Waf_Constants::define_entrypoint(); ?>
<?php defined( 'JETPACK_WAF_ENTRYPOINT' ) ? $this->render_waf_file( JETPACK_WAF_ENTRYPOINT ) : 'Not set'; ?>

Check failure on line 228 in projects/plugins/debug-helper/modules/class-waf-helper.php

View workflow job for this annotation

GitHub Actions / Static analysis

TypeError PhanTypeMismatchArgumentNullable Argument 1 ($file) is JETPACK_WAF_ENTRYPOINT of type ?array|?bool|?float|?int|?resource|?string but \Waf_Helper::render_waf_file() takes string defined at modules/class-waf-helper.php:148 (expected type to be non-nullable)

<hr>

Expand Down

0 comments on commit e789c15

Please sign in to comment.