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.

avoid_notice_undefined_index.patch444 bytesVincent B
PASSED: [[SimpleTest]]: [MySQL] 24 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


AndersG’s picture

Same error seems to exist in page.inc in /srv/www/htdocs/drupal-7.0/sites/all/modules/ctools/page_manager/plugins/tasks

esmerel’s picture

I'm seeing the same error in 7.x-1.2 on line 161. I'm not sure it's affecting anything though.

esmerel’s picture

Status: Active » Needs review

Tested the patch out manually, it works.

renat’s picture

Status: Needs review » Reviewed & tested by the community

Change, 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.

jimclegg’s picture

Title: Uninitialized string offset: 0 in page_manager_get_pages() (line 157 of ctools/page_manager/page_manager.admin.inc). » Uninitialized string offset: 0 in page_manager_get_pages() (line 161 of ctools/page_manager/page_manager.admin.inc).

My error was displaying for line 161 so I tried the patch and the error has disappeared. Thanks for a simple solution!

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Technically 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.