After upgrading to Drupal 6.19, I started getting some non-fatal PHP warnings in cases where variables were not defined. I've attached a patchfile with the changes I made to make the warnings go away.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | views-2.patch | 750 bytes | sheldon rampton |
| php_notices.patch | 951 bytes | sheldon rampton |
Comments
Comment #1
dawehnerthey will not apply on views 6.x-3.x Could you also try to make a patch for them? Thanks!
Comment #2
sheldon rampton commentedOK, try this.
Comment #3
dawehnerAnd what about the change in includes/query.inc?
Comment #4
sheldon rampton commentedFile "includes/query.inc" no longer exists in views 6.x-3.x, so there's nothing to patch there. The second patch I supplied was for 6.x-3.x.
Comment #5
dawehnerWell this kind of code could be in plugins/views_plugin_query_default.inc in views3
Comment #6
sheldon rampton commenteddereine, I looked in plugins/views_plugin_query_default.inc. The code that's in there has been significanly altered from the code that used to be in includes/query.inc. In particular, the places where a PHP warning message might occur have been wrapped in "if (isset()" statements similar to the code that I added in my patch. So, if that's where the code from includes/query.inc has landed, it has already been fixed. The only thing that still needs to be patched in 6.x-3.x, therefore, is the code that's in the "views-2.patch" file that I uploaded above.
Comment #7
dawehnerSo next step.
I'm wondering whether it makes sense to automatically generate a widget->id if there is none.
Comment #8
sheldon rampton commentedI can't speak to that. I don't know the Views code well enough. I just wrote a patch to stop PHP from kicking out the warning message.
Comment #9
dawehnerI'm pretty sure the second part is already part of another issue.
The first patch might hide a bug. Which kind of fields doesn't have #id set?
Comment #10
john franklin commentedI see it with some date_popup exposed filters. The date_popup widgets themselves have an '#id' value, but they live in a sub-array named after their filter identifier. That is, I see this an array structure like this, transcoded by hand from a dpm() output to php:
Comment #11
chris matthews commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue
Comment #12
chris matthews commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue