Jump to content

help me with this error.


Recommended Posts

Error: Call to a member function setLabel() on null in /home/nigthma1/domains/doctorwebhost.tk/public_html/includes/hooks/hook.php:8
Stack trace:
#0 /home/nigthma1/domains/doctorwebhost.tk/public_html/includes/hookfunctions.php(0): WHMCS\Utility\SafeInclude::{closure}(Object(WHMCS\View\Menu\Item))
#1 /home/nigthma1/domains/doctorwebhost.tk/public_html/vendor/whmcs/whmcs-foundation/lib/ClientArea.php(0): run_hook('ClientAreaPrima...', Object(WHMCS\View\Menu\Item))
#2 /home/nigthma1/domains/doctorwebhost.tk/public_html/vendor/whmcs/whmcs-foundation/lib/ClientArea.php(0): WHMCS\ClientArea->outputWithoutExit()
#3 /home/nigthma1/domains/doctorwebhost.tk/public_html/vendor/whmcs/whmcs-foundation/lib/Http/Message/AbstractViewableResponse.php(0): WHMCS\ClientArea->getOutputContent()
#4 /home/nigthma1/domains/doctorwebhost.tk/public_html/vendor/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php(27): WHMCS\Http\Message\AbstractViewableResponse->getBody()
#5 /home/nigthma1/domains/doctorwebhost.tk/public_html/vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php(34): Zend\Diactoros\Response\SapiEmitter->injectContentLength(Object(WHMCS\ClientArea))
#6 /home/nigthma1/domains/doctorwebhost.tk/public_html/clientarea.php(0): Zend\Diactoros\Response\SapiEmitter->emit(Object(WHMCS\ClientArea))
#7 {main}

Link to comment
Share on other sites

23 hours ago, doctorhostbest said:

Error: Call to a member function setLabel() on null in /home/nigthma1/domains/doctorwebhost.tk/public_html/includes/hooks/hook.php:8

the clue is in the error - your hook contains incorrect code at line #8... I assume you're trying to change the label of a menu item without checking whether it first exists... the solution will be to ensure that the item exists before you try to change it's label.

in any event, if it's a label of a default menu item, you should be able to change it using Language Overrides without the need to use a hook.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated