Jump to content
nagy00

function toPrefixed error

Recommended Posts

Hello ,my whmcs version is 7.5.1 with php version 7.4.12 and i have this error for any one go to cart :

 

Error: Call to a member function toPrefixed() on null in /home/ninjahost/public_html/templates_c/e448c6c0e39998a23297e953fd712c1bf8ed6315_0.file.viewcart.tpl.php:477
Stack trace:
#0 /home/ninjahost/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(122): content_5fb7b40495aa87_03553889()
#1 /home/ninjahost/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(199): Smarty_Template_Resource_Base->getRenderedTemplateCode()
#2 /home/ninjahost/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(159): Smarty_Template_Compiled->render()
#3 /home/ninjahost/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(191): Smarty_Internal_Template->render()
#4 /home/ninjahost/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(94): Smarty_Internal_TemplateBase->_execute()
#5 /home/ninjahost/public_html/vendor/whmcs/whmcs-foundation/lib/Smarty.php(0): Smarty_Internal_TemplateBase->fetch()
#6 /home/ninjahost/public_html/includes/clientareafunctions.php(0): WHMCS\Smarty->fetch()
#7 /home/ninjahost/public_html/cart.php(0): outputClientArea()
#8 {main}

 

screenshot of error attached 

 

Untitled.png

Share this post


Link to post
Share on other sites
On 20/11/2020 at 12:29, nagy00 said:

Hello ,my whmcs version is 7.5.1 with php version 7.4.12 and i have this error for any one go to cart :

I don't think v7.5 would support PHP 7.4 as it wouldn't have existed when v7.5 was developed and released - try dropping the PHP version down to PHP 7.2 or 7.3, or if you need to use PHP 7.4, then you might need to use v8 or later.

Share this post


Link to post
Share on other sites

Would agree with @brian! , though looking at the error it seems the view cart template has PHP in it that is trying to access an object but that object has not been initialized .  Are you using a custom orderform? 

Share this post


Link to post
Share on other sites
12 hours ago, brian! said:

I don't think v7.5 would support PHP 7.4 as it wouldn't have existed when v7.5 was developed and released - try dropping the PHP version down to PHP 7.2 or 7.3, or if you need to use PHP 7.4, then you might need to use v8 or later.

Hello , i tried all PHP versions from 5.6 to 7.4 even 7.2 and 7.3 give me the same error , i really don't know how i can fix this because this is very bad problem for me and my work any solutions please ?

Share this post


Link to post
Share on other sites
On 22/11/2020 at 05:48, nagy00 said:

i really don't know how i can fix this because this is very bad problem for me and my work any solutions please ?

have you made any changes to the templates ? specifically viewcart.tpl ??

if so, what happens when you use a clean (unaltered) version of Six and standard_cart ??

Share this post


Link to post
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