Skip to content

cant open treeview for objects with closures #55

@stSaHiB

Description

@stSaHiB

Hi Christoph,

I have a strange problem, right from the beginning of the "new webextension version". I havent reported it yet, cause I haven't found a way to repoduce it, nor I can tell why it shows up in some cases. But it happens quite often to me...
While writing this Post, I recognized that it seems like closures are causing the problems. I leave the rest of the post in, so you can see the problem apearing on "higher levels" of the data

I got an quite simple Object and I want to debug it to the console:
FB::warn($filter);

Object ist structred like you see here
problem
As you can see, I tried to open the filter-branch, but nothing happend.

With other objects it's working like a charm, with some objects, i can't access anything below.

even when i try to access the array directly
FB::warn($filter->filter,'not working');
I'm not able to open the array in order to see the 8 entries in tree view. clicking the + just opens one blank line:
3

I got a workaround for cases. I convert it to json and back to array
FB::warn(json_decode(json_encode($filter->filter['im_sortiment']),true),'working');
2

SOLUTION
I just casted one element of the $filter->filter array as an Object and that brought me closer to the problem:
Zwischenablage05

As you cat see, each of the 8 elements of the filter array is an array, having one closure in it (get_sql), If I unset that field, I can debug it,while if the closure is somwhere in the array, even at lower levels the whole thing can't be opened. The json trick get's rid of the closures, that's why it worked that way...

maybe you find a fix for it - it's hard tracking errors while some data is "invisible" :-)

greetz and thx
sahib

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions