PHP Deprecated

Creative Contact Form is a responsive jQuery contact form with amazing visual effects. You will be surprised by count of all the possible features!
Thu Aug 24, 2017 9:59 pm

  • Hello,

    Our website, sherwininc.com, is generating the following error in our error log,

    PHP Deprecated: Non-static method JApplicationSite::getMenu() should not be called statically in /home/sherwini/public_html/components/com_creativecontactform/router.php on line 119

    We're running Joomla 3.7.5, PHP Version 7.0.22, and Creative Contact Form 4.5.0.

    Do you have a fix for this?
    User avatar
    sohopros
     
    Posts: 21
    Joined: Sat Jun 18, 2016 2:18 am

Thu Aug 24, 2017 10:09 pm

  • Hello,

    Please replace the following lines on 119,120 in /components/com_creativecontactform/router.php
    Code: Select all
    $menu=& JSite::getMenu();
    $item=& $menu->getActive();

    //replace with
    $menu   = JFactory::getApplication()->getMenu();
    $item   = $menu->getActive();


    That will fix the issue.

    I will update it in package on next release.
    Best Regards,

    Simon
    User avatar
    Simon
    Site Admin
     
    Posts: 1499
    Joined: Wed Mar 05, 2014 1:04 am

Mon Sep 11, 2017 6:48 pm

  • Thanks Simon,
    We are getting an additional error as well:
    HP Deprecated: Non-static method JApplicationCms::getMenu() should not be called statically in /home/domain/public_html/libraries/cms/application/site.php on line 272

    Can you post a fix for that as well?
    User avatar
    sohopros
     
    Posts: 21
    Joined: Sat Jun 18, 2016 2:18 am

Mon Sep 11, 2017 6:59 pm

  • After a closer look, we are using version 4.6 of CCF on this other site and seeing these two errors:

    PHP Deprecated: Non-static method JApplicationSite::getMenu() should not be called statically in /home/ebmclean/public_html/components/com_creativecontactform/router.php on line 119

    PHP Deprecated: Non-static method JApplicationCms::getMenu() should not be called statically in /home/ebmclean/public_html/libraries/cms/application/site.php on line 272

    And the fix you previously posted does not match the code we see in router.php:
    Code: Select all
    119      // If no specific link has been found, search for a general one.
    120
    User avatar
    sohopros
     
    Posts: 21
    Joined: Sat Jun 18, 2016 2:18 am

Fri Sep 29, 2017 8:19 pm

  • Hi,

    Was you been able to update Creative contact form with the fix?

    Please advise,
    Sandra
    User avatar
    sohopros
     
    Posts: 21
    Joined: Sat Jun 18, 2016 2:18 am



Return to Creative Contact Form




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest
cron