# |
Oct 12th 2017, 15:03 |
inoas |
warnWhenWritesFail would be another flag name - all so verbose |
# |
Oct 12th 2017, 15:03 |
hmic |
is failing (fails) vs. failure |
# |
Oct 12th 2017, 15:02 |
inoas |
is "fails" as noun proper english? or just "failures"? |
# |
Oct 12th 2017, 15:01 |
inoas |
function/method called would be warning() |
# |
Oct 12th 2017, 15:01 |
neon1024 |
@jl.fmst If your settings controller doesn’t have a save() call, then perhaps it’s a behaviour |
# |
Oct 12th 2017, 15:01 |
inoas |
warnOnWriteFails vs warnOnWriteFailures vs warningOnWriteFails vs warningOnWriteFailures |
# |
Oct 12th 2017, 15:00 |
neon1024 |
But always handy to know for sure |
# |
Oct 12th 2017, 15:00 |
neon1024 |
Well debug kit does tell you about generated table instances |
# |
Oct 12th 2017, 14:59 |
inoas |
https://gist.github.com/inoas/85f3b3a5552a41347ce5c2b289273ae1 helps me with missing or miss-named table classes |
# |
Oct 12th 2017, 14:57 |
jl.fmst |
@neon1024, awesome i'll try that |
# |
Oct 12th 2017, 14:57 |
jl.fmst |
this is all i can get off the error log |
# |
Oct 12th 2017, 14:57 |
neon1024 |
Carefull with the table registry though as it will auto-create stuff if it’s not loaded |
# |
Oct 12th 2017, 14:57 |
jl.fmst |
https://gist.github.com/anonymous/f8517b13fcab25613d0070099dd5c07c |
# |
Oct 12th 2017, 14:57 |
neon1024 |
`TableRegistry::exists('Foo')` |
# |
Oct 12th 2017, 14:56 |
jl.fmst |
well |
# |
Oct 12th 2017, 14:56 |
inoas |
and then track it down from there |
# |
Oct 12th 2017, 14:56 |
inoas |
the first thing you should do is figuring out where the error occured in the first place IMHO |
# |
Oct 12th 2017, 14:56 |
neon1024 |
Er, it’ll be in the registry |
# |
Oct 12th 2017, 14:56 |
inoas |
bad if loadModel doesn't throw an exception Q_Q |
# |
Oct 12th 2017, 14:55 |
inoas |
:+1: right! |
# |
Oct 12th 2017, 14:55 |
neon1024 |
Well `$foo = $this->loadModel('Foo'); $foo = $accidentallyFalse; $foo->save();` |
# |
Oct 12th 2017, 14:55 |
jl.fmst |
ok first thing sfirst, how do i check if a table is loaded? |
# |
Oct 12th 2017, 14:55 |
inoas |
table class not loaded would be on null "I believe" |
# |
Oct 12th 2017, 14:54 |
jl.fmst |
@mail, :P i mean, sorry, i'm not actually using a ->save method |
# |
Oct 12th 2017, 14:54 |
inoas |
jl.fmst it was an example :/ |
# |
Oct 12th 2017, 14:54 |
neon1024 |
Although tbh if you’re calling save() on a boolean then it sounds like either a table class isn’t loaded, or you’ve overwritten a variable |
# |
Oct 12th 2017, 14:54 |
jl.fmst |
i'm not even using "$foo" |
# |
Oct 12th 2017, 14:54 |
inoas |
$foo->save() <= $foo is of type boolean |
# |
Oct 12th 2017, 14:54 |
jl.fmst |
@neon1024, i only get to see the error in the error.log file, for some reason the site doesn't actually output me the error |
# |
Oct 12th 2017, 14:53 |
neon1024 |
@jl.fmst Check the stacktrace in the exception |
# |
Oct 12th 2017, 14:52 |
inoas |
neon1024 I would write a little proxy action that just checks for the button pressed and delegates to another action ;) |
# |
Oct 12th 2017, 14:52 |
inoas |
how can that be? |
# |
Oct 12th 2017, 14:52 |
inoas |
in https://gist.github.com/inoas/c306493a63ccffca9e6ced0bec07f22f#file-where-is-the-problem-php-L23 and #21 my linter tells me Classlike is not defined or imported anywhere |
# |
Oct 12th 2017, 14:49 |
jl.fmst |
guys how would one go about debugging a "Call to a member function save() on boolean" error? I'm trying to post stuff to my db but its not working |
# |
Oct 12th 2017, 14:48 |
inoas |
+202 I say. |
# |
Oct 12th 2017, 14:48 |
inoas |
<3 |
# |
Oct 12th 2017, 14:48 |
inoas |
HAHA |
# |
Oct 12th 2017, 14:48 |
inoas |
Well, it is clearly not meant to handle binaries |
# |
Oct 12th 2017, 14:48 |
neon1024 |
Sure, it’s called the power button ;) |
# |
Oct 12th 2017, 14:47 |
inoas |
you mean the tinkering with files before committing ;)? |
# |
Oct 12th 2017, 14:47 |
neon1024 |
The binary file handling in Git |