Download & Extend

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

Project:Chaos tool suite (ctools)
Version:7.x-1.0
Component:Page Manager
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

AttachmentSizeStatusTest resultOperations
avoid_notice_undefined_index.patch444 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 24 pass(es).View details

Comments

#1

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

#2

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

#3

Status:active» needs review

Tested the patch out manually, it works.

#4

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.

#5

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!

#6

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.

#7

Status:fixed» closed (fixed)

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