Skip to content
This repository was archived by the owner on Dec 9, 2020. It is now read-only.

Commit 894e064

Browse files
author
Giulio
committed
Prevents uncaught error if class name is an invalid string.
1 parent 6159eb8 commit 894e064

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

classes/EssentialScript/Frontend/Presenter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public function __construct() {
5151
*/
5252
public function router() {
5353

54+
// Prevents uncaught error if class name is an invalid string.
55+
if ( ! isset( $this->options['where'] ) ) {
56+
return null;
57+
}
5458
// Trigger: does use of variable function to fire the correct method.
5559
$func = "\\EssentialScript\\Frontend\Filter\\" .
5660
ucwords( $this->options['where'] );

0 commit comments

Comments
 (0)