In some cases when path is not exiting ie it should return 404 the key for that path 'cache_menu:menu_item:hash:serialized' , where hash is the hashed path returns an empty string. This confuses the output and throws error like:

Notice: Uninitialized string offset: 0 in menu_get_object() (line 956 of /home/vivek/projects/cse/work/iep/public_html/includes/menu.inc).

This can be fixed if the line number 27 in the file lib/Redis/Cache/Predis.php is changed from :

if (!isset($serialized)) {

to :

if (empty($serialized)) {

Comments

pounard’s picture

Assigned: Unassigned » pounard

Indeed, I can reproduce this bug. Thanks for reporting.

I might not fix the bug the way you said, because the "serialized" value test here serve another purposes. I will do some debugging.

pounard’s picture

Status: Active » Fixed

Fixed in 7.x-1.0-alpha6, this release will appear shortly.

Status: Fixed » Closed (fixed)

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

  • Commit ffcbbda on 7.x-1.x, 7.x-2.x-sharding, 7.x-2.x-path by pounard:
    Fixed #1241922 - thanks to vivek.puri - Cache errors in menu
    
    
  • Commit 4a5a9d2 on 7.x-1.x, 7.x-2.x-sharding, 7.x-2.x-path by pounard:
    Fixed #1241922 - thanks to vivek.puri - Cache errors in menu