Wedge

Public area => Bug reports => The Pub => Archived fixes => Discussion démarrée par: live627 le 25 Avril 2012 à 08:04

Titre: Undefined index in wetem::find
Posté par: live627 le 25 Avril 2012 à 08:04
If the target layer/block doesn't exist, $to is never defined.

Case in point: I have added a block to the body, which works fine, The problem comes in XML mode, where the layer isn't registered.
Titre: Re: Undefined index in wetem::find
Posté par: Nao le 26 Avril 2012 à 17:08
How could it return an undefined index on $to? $to is never used as an index, AFAIK...?

As for what you're describing -- it's actually addressed in the wetem::find source code.

Code: [Sélectionner]
// If we try to insert a sideback block in XML or minimal mode (hide_chrome), it will fail.
// Plugins should provide a 'default' fallback if they consider it vital to show the block, e.g. array('sidebar', 'default').

So there you go... Just add , 'default' right after the name of the layer where you want to add :)
Titre: Re: Undefined index in wetem::find
Posté par: live627 le 28 Février 2013 à 02:31
Note to self: this may be fixed in r1957.
Titre: Re: Undefined index in wetem::find
Posté par: Nao le 28 Février 2013 à 07:13
Can't believe you reported it a year ago... ;(