File: /www/htdocs/sites/all/modules/contrib/views/plugins/export_ui/views_ui.class.php
Line 383: [Warning] Function argument(s) returned by "func_get_args" might have been modified
func_get_args();
File: /www/htdocs/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_base_views_wizard.class.php
Line 572: [Warning] Nested by-reference foreach loop, make sure that array modifications (if any) do what you expect
foreach ($display_options['default']['fields'] as &$field) {
}
File: /www/htdocs/sites/all/modules/contrib/views/views.api.php
Line 1170: [Warning] Nested by-reference foreach loop, make sure that array modifications (if any) do what you expect
foreach ($condition_group['conditions'] as &$condition) {
}
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | views-3006201-4.patch | 2.27 KB | alt.dev |
Comments
Comment #2
stephenrobinson commentedComment #3
alt.dev commentedDuring the update of our project to the PHP7, we found several places where warnings with 'Illegal string offset' text appeared and these warnings caused some issues. Analyzing the views module we found that its code contains some 'Illegal string offset' problems as well. I attach a patch which fixes these warnings.
Comment #4
alt.dev commentedMy bad. Attached wrong file :(
Comment #5
damienmckennaI don't see how these comments would cause these errors? Drupal 7 doesn't care about comments.
Comment #6
stephenrobinson commentedI have found with php7 'Illegal string offset' means some code does this:
Comment #7
jweowu commentedThe first item (quoted below) is addressed in #3016530: Relocate calls to func_get_args() to beginnings of functions.
File: /www/htdocs/sites/all/modules/contrib/views/plugins/export_ui/views_ui.class.php Line 383: [Warning] Function argument(s) returned by "func_get_args" might have been modified func_get_args();Comment #8
marc.groth commentedFWIW the following issue has been raised which addresses the first problem: https://www.drupal.org/project/views/issues/3076826
After applying the patch from the aformentioned ticket on version 7.x-3.23 of the module; there are no more errors related to <= PHP 7.2.
Comment #9
joseph.olstadI've been using PHP 8.1 with the latest release of views for quite some time and have even tried it with PHP 8.2 and have not seen these PHP 7.0 issues.
I'm guessing this is an outdated issue.
possibly can close this.
Strangely enough the patch still applies but shouldn't actually change anything as it's only changing comments.