cp-nav icon indicating copy to clipboard operation
cp-nav copied to clipboard

Call to a member function getNavigations() on null - /app/vendor/verbb/cp-nav/src/services/Service.php: 46.

Open jamesmacwhite opened this issue 2 years ago • 0 comments

Description

The following error is being logged in Yii Debug toolbar on all Control Panel requests but doesn't appear to be causing too much harm.

Call to a member function getNavigations() on null - /app/vendor/verbb/cp-nav/src/services/Service.php: 46.

It would appear $layout when being looped is null here: https://github.com/verbb/cp-nav/blob/craft-3/src/services/Service.php#L46, so getNavigations() fails.

Potentially wrapping with an if to check if layout is there first is possibly an easy fix.

Additional info

  • Craft version: 3.7.46

jamesmacwhite avatar Jul 04 '22 17:07 jamesmacwhite