Forum
MailChimp app and PHP 7.1
Ran across a small bug in the Perch control dashboard with the MailChimp app while running tests on PHP 7.1
No error when I switched back to PHP 7.0.13
The error pops up in the dashboard.
: Uncaught Error: [] operator not supported for strings in /Users/scottgruber/git/scottgruber/perch/addons/apps/perch_mailchimp/dashboard.php:55 Stack trace: #0 /Users/scottgruber/git/scottgruber/perch/core/dashboard/modes/dash.post.php(30): {closure}(Object(PerchAuthenticatedUser)) #1 /Users/scottgruber/git/scottgruber/perch/core/dashboard/index.php(20): include('/Users/scottgru...') #2 {main} thrown in
/Users/scottgruber/git/scottgruber/perch/addons/apps/perch_mailchimp/dashboard.php
on line 55
Found post on stack overflow of change in PHP 7.1.
The empty index operator (e.g. $str[] = $x) is not supported for strings anymore, and throws a fatal error instead of silently > converting to array.
My Perch diagnostics:
Perch Runway: 3.0, PHP: 7.1.0, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: d8daadaf41e3cd81d7c6ae96c6091fd15b2c9382 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (3.0), assets (3.0), categories (3.0), perch_forms (1.9), perch_kraken (1.1), perch_mailchimp (3.1), perch_twitter (3.7)
App runtimes: <?php $apps_list = array( 'perch_mailchimp', 'perch_forms', 'perch_twitter', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/scottgruber/git/scottgruber/perch
PERCH_CORE: /Users/scottgruber/git/scottgruber/perch/core
PERCH_RESFILEPATH: /Users/scottgruber/git/scottgruber/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 32M, Max POST 32M, Memory: 256M, Total max file upload: 32M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
HTTP_HOST: scottgruber.dev:8890
DOCUMENT_ROOT: /Users/scottgruber/git/scottgruber
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Looks like a typo - we'll get it updated.