I updated CS Adaptive Image to CS Adaptive Image 7.x-1.1 on my Drupal 7 Site and it started throwing this error on every page using CS Adaptive Image:
Error: [] operator not supported for strings in theme_cs_adaptive_image_formatter() (line 252 of /code/sites/all/modules/cs_adaptive_image/cs_adaptive_image.module).
Update to CS Adaptive Image 7.x-1.1 on a server running PHP 7.1.33
Add one line above line 252 to first define an empty array before giving the array a value.
It looks like the error may be caused by a PHP syntax change in PHP 7.1
See this resource: https://wordpress.org/support/topic/fatal-error-operator-not-supported-f...
diff --git a/sites/all/modules/cs_adaptive_image/cs_adaptive_image.module b/sites/all/modules/cs_adaptive_image/cs_adaptive_image.module
index fd4790384..bf92be20c 100644
--- a/sites/all/modules/cs_adaptive_image/cs_adaptive_image.module
+++ b/sites/all/modules/cs_adaptive_image/cs_adaptive_image.module
@@ -249,6 +249,7 @@ function theme_cs_adaptive_image_formatter($variables) {
// to serve an adapted image. Some browsers cannot access the
// children of a <noscript> element, thus all the data needs to be
// attached to the <noscript> element.
+ $image['attributes']['class'] = [];
$image['attributes']['class'][] = 'adaptive-image';
$attributes['class'][] = 'adaptive-image';
if (isset($variables['breakpoint_styles'])) {
Fixed
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.