[Thu Mar 17 19:47:12 2016] 127.0.0.1:56008 [500]: / - Uncaught Error: Call to a member function url() on null in /home/manu/Desktop/napoli/site/templates/home.php:10
Stack trace:
#0 /home/manu/Desktop/napoli/kirby/toolkit/lib/tpl.php(22): require()
#1 /home/manu/Desktop/napoli/kirby/kirby.php(705): Tpl::load('/home/manu/Desk...')
#2 /home/manu/Desktop/napoli/kirby/kirby.php(680): Kirby->template(Object(Page), Array)
#3 /home/manu/Desktop/napoli/kirby/kirby.php(781): Kirby->render(Object(Page))
#4 /home/manu/Desktop/napoli/index.php(16): Kirby->launch()
#5 {main}
thrown in /home/manu/Desktop/napoli/site/templates/home.php on line 10
Also when I do var_dump $menu->files() I always get the whole $menu page object instead of just the files array.
Why do I need toArray() I remember in older versions of kirby I didnt need to do so and var_dump worked as expected. It is really annoying to get the whole page object with all the stuff in there all the time.
I need to read about collection. I thought it is the same as an array. Seems to be a kirby related thing.
Is there any good way to dump objects in a more comfy way? If I write them in a 20% column I could never really read what’s going on in there. Do you know of an utility or how do you deal with? console.log() as workaround?