Active
Project:
GMap Module
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Mar 2012 at 05:02 UTC
Updated:
27 Mar 2012 at 21:18 UTC
Jump to comment: Most recent file
I'm using Views module to create a block for Gmap to show user location.
Assume that the block is finished and I want to change its parameters.
If I click to the "Setting" of the "Gmap" format, then click "Apply", the data structure will change, from
Array
(
[0] => stdClass Object
(
[location_latitude] => 14.213268
[location_longitude] => 121.006348
[users_name] => admin
[uid] => 1
[users_created] => 1328843683
[gmap_lat] => 14.213268
[gmap_lon] => 121.006348
)
)
to
Array
(
[] => Array
(
[group] =>
[rows] => Array
(
[0] => stdClass Object
(
[location_latitude] => 14.213268
[location_longitude] => 121.006348
[users_name] => admin
[uid] => 1
[users_created] => 1328843683
[gmap_lat] => 14.213268
[gmap_lon] => 121.006348
)
)
)
)
(the $records variable), leading to this error
Trying to get property of non-object
Notice: Trying to get property of non-object in gmap_plugin_style_gmap->render
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | Distorted_data_structure_non_object.patch | 3.37 KB | hongquan |
| #1 | Distorted_data_structure_non_object.patch | 3.38 KB | hongquan |
Comments
Comment #1
hongquan commentedHere is my patch, for workaround (it just reshapes the distorted data structure, not prevent the distortion).
Comment #2
hongquan commentedImproved patch
Comment #3
mstef commentedPatch was made to apply with p3 - should be 0 or 1.
Also, 6 out of 7 fails for the latest dev.
I'm getting the same error that you're getting though.