I can fix the 5.6 error for you!
Change the sanitize function on line 642 of /class/members.php to the following:
function sanitize($s) {
// to be used in future updates
$p = new PDO('mysql:dbname='.DB_NAME.';host='.DB_HOST,DB_USER,DB_PASSWORD);
return substr($p->quote($s),1,strlen($p->quote($s))-2);
}
As far as the first error goes, what does your shortcode look like?
When I view the page using PHP7, I see the entire page Except for the list of members… I see the alphabet where I can select the letter for the listing, but I cannot see any members.
Note: When I switch back to PHP5.6, all works well. I want to go over to PHP7 though!
Are there any plans to fix that function for ‘Illegal String Offset’?
Thanks for getting rid of the errors in PHP 5.6!
I replaced the sanitize function what was on line 448-450 with the code that you suggested.
However, the same behavior displayed itself when I tried out PHP 7 again. No list, and several instances of “Illegal string offset ‘name’ — 432″ in the php error log.
Edit: Strange — It thinks it’s displaying #1-5 .. and then when I go to the next page #6-11, and it even leaves blank space for them (Under PHP7), but nothing is displayed.
My Shortcode is: [members-list list=”” search=true alpha=true pagination=true pagination2=true sort=true radius=false]
-
This reply was modified 9 years, 3 months ago by
patrickhait. Reason: more details
-
This reply was modified 9 years, 3 months ago by
patrickhait.
-
This reply was modified 9 years, 3 months ago by
patrickhait. Reason: updated shortcode
-
This reply was modified 9 years, 3 months ago by
patrickhait.
-
This reply was modified 9 years, 3 months ago by
patrickhait.
So Sorry! You can mark this ‘probably’ solved .. I was stuck on an old version 3.6.3. I tested the plugin on another site and saw that it worked on PHP7. It was a change that I made a long time ago and forgot that I didn’t allow the upgrade to happen. Thank you for your assistance.
Excellent! Glad everything worked out.