Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I just updated my ctools module from a 7.x.1.0-alpha3 to a 7.x.1.0 and a notice occured when i visit an administrive page provided by the module panels. This notice is from the page_manager feature of ctools in the line 157 of the file page_manager.admin.inc.
Some paths saved in $task['admin path'] ended by a '/', that's why the last result of the explode is an empty string. The test $bit[0] != '!' occured an error in this case.
Please find in attachment a simplistic patch to solve this notice.
Comment | File | Size | Author |
---|---|---|---|
avoid_notice_undefined_index.patch | 444 bytes | Vincent B | |
Comments
Comment #1
AndersG CreditAttribution: AndersG commentedSame error seems to exist in page.inc in /srv/www/htdocs/drupal-7.0/sites/all/modules/ctools/page_manager/plugins/tasks
Comment #2
esmerel CreditAttribution: esmerel commentedI'm seeing the same error in 7.x-1.2 on line 161. I'm not sure it's affecting anything though.
Comment #3
esmerel CreditAttribution: esmerel commentedTested the patch out manually, it works.
Comment #4
renat CreditAttribution: renat commentedChange, proposed by @Vincent B, looks good, patch from OP solved that problem for me. Keeping in mind results of it's test by @esmerel, mark it RTBC.
Comment #5
jimclegg CreditAttribution: jimclegg commentedMy error was displaying for line 161 so I tried the patch and the error has disappeared. Thanks for a simple solution!
Comment #6
merlinofchaos CreditAttribution: merlinofchaos commentedTechnically that admin path is probably a bug that also needs to be fixed, but it seems to be harmless with this applied. Committed and pushed.