Closed (fixed)
Project:
Google Search Appliance
Version:
7.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jul 2012 at 21:46 UTC
Updated:
27 Jul 2012 at 19:09 UTC
Jump to comment: Most recent file
Comments
Comment #1
mpgeek commentedMerging issues here.
That's from #1700536: Notice: Uninitialized string offset: 0 in google_appliance_block_view_alter() appears on every page after installing the module ... It turns out that using an empty string for a default settings value that is meant to be an empty array at the start is causing problem. Patch coming soon.
Comment #2
mpgeek commentedMarked #1700536: Notice: Uninitialized string offset: 0 in google_appliance_block_view_alter() appears on every page after installing the module as duplicate.
Comment #3
mpgeek commentedI wasn't able to reproduce the error in any of my dev environments, but i did notice that after installation the array key's value is an empty string (instead of an empty array), and depending upon your PHP version
isset()behaves a bit differently (note the "isset() on String Offsets") here: http://us2.php.net/manual/en/function.isset.php).Anyways, a patch is attached that should fix that.
Comment #4
mpgeek commentedCommitted to dev: http://drupalcode.org/project/google_appliance.git/commit/3e8f763.
@Damien @Ari, do either of you have time to try this out and post back here whether or not this fixes issues you experienced? Thanks.
Comment #5
iamEAP commentedHmm. Thought I'd covered this case in my patch, but I guess not. The variable handling code this module uses is pretty clever, but its weakness is in handling non-scaler variable data. Maybe eventually, we'll want to move away from storing these block visibility settings in a variable and throwing them into their own table (or appending them to the the block table), but the above patch looks like the best compromise for now.
Maybe the
if ($settings['block_visibility_settings'] == '')should be....
if ($settings['block_visibility_settings'] === '')Comment #6
mpgeek commentedI only noticed that in fact isset() was trying to index into a string upon fresh install, but it still worked in my environments. Going to wait for reports from Damien and Ari to see if it actually fixes it, as I cannot reproduce the error.
Comment #7
damienmckennaThe current -dev codebase no longer has the error.
Comment #8
mpgeek commented@DamienMcKenna, thanks for the feedback. Stable 7.x-1.8 has been pushed: http://drupal.org/node/1703058.