Test empty var
This commit is contained in:
parent
6bafa8f0e6
commit
2aa3bce5f7
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ class Selected {
|
||||||
|
|
||||||
static function selected($var, $ref) {
|
static function selected($var, $ref) {
|
||||||
$testPostsPage = explode('/', $ref);
|
$testPostsPage = explode('/', $ref);
|
||||||
if ($testPostsPage[1] === 'post') {
|
if (isset($testPostsPage[1]) && $testPostsPage[1] === 'post') {
|
||||||
$ref = '/posts';
|
$ref = '/posts';
|
||||||
}
|
}
|
||||||
if ($var === $ref) {
|
if ($var === $ref) {
|
||||||
|
|
Loading…
Reference in a new issue