Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant open treeview for objects with closures #55

Open
stSaHiB opened this issue Mar 14, 2020 · 0 comments
Open

cant open treeview for objects with closures #55

stSaHiB opened this issue Mar 14, 2020 · 0 comments

Comments

@stSaHiB
Copy link

stSaHiB commented Mar 14, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant