1. Joe Sonne
  2. Bugs
  3. Monday, 15 August 2016
  4.  Subscribe via email
Hi there,
I get a fatal error on a Joomla 3.6.2 site when switched to PHP7.
Here's the error:

KExceptionError | Fatal Error

Function name must be a string
.../templates/purity_iii/html/mod_cmc/default.php:76
71 {
72 foreach ($fields as $f)
73 {
74 $field = explode(';', $f);
75 echo '<div class="control-group">';
76 echo $form->$field[1]($field);
77 echo '</div>';
78 }
79 }
80
81 if (is_array($interests))


I've been told that Line 76: "echo $form->$field[1]($field);" is not valid in PHP7 and is generating an error as our build in debugger shows. This line needs to be fixed and be made compatible with PHP7.

I'm not a PHP guy so I am only going on information forwarded to me by another developer.

Would changing this one line and making it valid in PHP7 give me the ability to run the site in PHP7?

The site runs fine in PHP5.5.

Is this a simple change?

Best regards,
Joe Sonne
Responses (7)
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
Is this CMC v3 now?
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. Bugs
  3. # 1
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
and this here is actually a template override. Make sure to use v3 and remove the override to be sure that the extension works with php7
.../templates/purity_iii/html/mod_cmc/default.php:76
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. Bugs
  3. # 2
Accepted Answer Pending Moderation
Hi Daniel,

My CMC Mailchimp is at version 2.

I just tried to download version 3 from the downloads page and the download link gives me a 404.

Best regards,

Joe
  1. more than a month ago
  2. Bugs
  3. # 3
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
try again please. It should work now.
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. Bugs
  3. # 4
Accepted Answer Pending Moderation
Thanks Daniel,

I've updated to version 3 now.

So I should also completely remove the html/mod_cmc folder from the template?

Joe
  1. more than a month ago
  2. Bugs
  3. # 5
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
yep, it's an override, not done by us and I can't guarantee that it works on PHP7
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. Bugs
  3. # 6
Accepted Answer Pending Moderation
Much thanks for your replies Daniel.
And also thanks for a great component and module!
  1. more than a month ago
  2. Bugs
  3. # 7
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Last questions

J5 compatibility for Hotspots
Hi guys, Just started to update my old J3x website. Is there J5 compatibility p...
1 Replies
Posted on Monday, 24 February 2025
  • #Hotspots
  • #hotspots Joomla 5
Text size in the comment input form
Hello. How can I increase the font size in the comment input field? For examp...
0 Replies
Posted on Wednesday, 26 February 2025
  • #CComment 6
Problem with enlarged image
Hello. When you click on the image in the comments, it does not appear in the ce...
1 Replies
Posted on Wednesday, 26 February 2025
Black square instead of images in comments
Hello. In comments instead of images I see black squares. Here is an example. h...
0 Replies
Posted on Wednesday, 26 February 2025
  • #ccoment pro
Link bug in comment emails
Hello. The site has three languages. For example, a user left a comment on an a...
3 Replies
Posted on Saturday, 15 April 2023