×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: CMC - Mailchimp & PHP7

CMC - Mailchimp & PHP7 8 years 3 months ago #34675

  • Joe Sonne
  • Joe Sonne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
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

CMC - Mailchimp & PHP7 8 years 3 months ago #34676

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Is this CMC v3 now?

CMC - Mailchimp & PHP7 8 years 3 months ago #34677

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
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

CMC - Mailchimp & PHP7 8 years 3 months ago #34678

  • Joe Sonne
  • Joe Sonne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
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

CMC - Mailchimp & PHP7 8 years 3 months ago #34679

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
try again please. It should work now.

CMC - Mailchimp & PHP7 8 years 3 months ago #34680

  • Joe Sonne
  • Joe Sonne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
Thanks Daniel,

I've updated to version 3 now.

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

Joe

CMC - Mailchimp & PHP7 8 years 3 months ago #34681

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
yep, it's an override, not done by us and I can't guarantee that it works on PHP7

CMC - Mailchimp & PHP7 8 years 3 months ago #34682

  • Joe Sonne
  • Joe Sonne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
Much thanks for your replies Daniel.
And also thanks for a great component and module!
  • Page:
  • 1
Time to create page: 0.109 seconds