friends-of-contao / contao-memberlist

Memberlist extension
6 stars 10 forks source link

Fatal error: Cannot use 'String' as class name as #15

Closed bauralex closed 6 years ago

bauralex commented 6 years ago

Hi

I have Contao 3.5.32 with PHP 7.1 and I get the following error when I open the frontend with the memberlist on it

Fatal error: Cannot use 'String' as class name as it is reserved in /home/hiltlch/www/dev.hiltl.ch/system/modules/core/library/Contao/String.php on line 28

I already changed String:: to StringUtil:: but that didn't work... Is there a workaround?

Thank you

Alex

cliffparnitzky commented 6 years ago

What did you changed where?

bauralex commented 6 years ago

I’ve read in forums that I should change the class String to StringUtil with PHP >7 so I tried to change line memberlist/modules/ModuleMemberlist.php Line 492

$value = String::encodeEmail($value);

to

$value = StringUtil::encodeEmail($value);

But I still get the error…. I’ve deactivated all the plugins except of this one and the error occurs thats why I think it has to be something with this plugin

Thank you for your help

Alex

Am 10.09.2018 um 17:45 schrieb Cliff Parnitzky notifications@github.com:

What did you changed where?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/friends-of-contao/contao-memberlist/issues/15#issuecomment-419960636, or mute the thread https://github.com/notifications/unsubscribe-auth/ACHAiVLWU1iselw7-6HgIA_tv63naW9_ks5uZokYgaJpZM4Whnxk.

cliffparnitzky commented 6 years ago

I was wondering because version 2.0.0 is compatible with PHP 7: https://github.com/friends-of-contao/contao-memberlist/releases/tag/2.0.0

I assume, you installed an older version. Please ensure the newest version is installed.

bauralex commented 6 years ago

Perfect it works now… I haven’t seen the version 2.0 and I couldn’t update it through Contao to this version

Thank you very much

Alex

Am 10.09.2018 um 21:17 schrieb Cliff Parnitzky notifications@github.com:

I was wondering because version 2.0.0 is compatible with PHP 7: https://github.com/friends-of-contao/contao-memberlist/releases/tag/2.0.0 https://github.com/friends-of-contao/contao-memberlist/releases/tag/2.0.0 I assume, you installed an older version. Please ensure the newest version is installed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/friends-of-contao/contao-memberlist/issues/15#issuecomment-420028233, or mute the thread https://github.com/notifications/unsubscribe-auth/ACHAicf0ZkOGuXyYpbTJg9DoelyBAWPIks5uZrqygaJpZM4Whnxk.