Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Jelmer Schreuder
Fuel core developer, check my bio on the about page.
Discussions
1
Comments
792
Activity
How to check if record was found
You can check it, I can't on my phone (or I can but am too lazy). But he clearly gets a Query object returned which I think can only happen when you input null.
Comment by
Jelmer Schreuder
August 2011
permalink
How to check if record was found
I'm sorry, I misspoke it is "find by pk" not just id, the rest of my explanation stands: the problem is that it got null as input.
Comment by
Jelmer Schreuder
August 2011
permalink
How to check if record was found
The problem is most likely when the input for find() is null, in that case it's just an alias for query() and expects you to go method chaining. The find() method has 3 uses: find by id (with just 1 input), find first/last/all using the 2nd pa…
Comment by
Jelmer Schreuder
August 2011
permalink
Upgrading to newest release and Log::info() doesn't write anything to the log now.
There was a bug fixed just before 1.0 release that made the Log::info() work even if the threshold was higher, this is why some will get this after updating. To clarify: it was a bug that it worked before ignoring the logging threshold, it should b…
Comment by
Jelmer Schreuder
August 2011
permalink
csrf help
@Wanwizard that's why there's a JS helper that can be printed by a method (it's in docs, can't remember right now) if you use that to grab the value from the cookie onsubmit there's no problem.
Comment by
Jelmer Schreuder
August 2011
permalink
ORM: find('all') returning error
On a phone thus keeping it short and can't answer fully. But find(all) returns an array what do you think will happen if you call a method on the output of that? Answer: almost the exact same error but about a method instead of a property. Rea…
Comment by
Jelmer Schreuder
August 2011
permalink
Error handling question (v.1.0)
Will be possible a lot more gracefully in v1.1 thanks to the new support for a handle() method in Exception classes.
Comment by
Jelmer Schreuder
August 2011
permalink
has_many models delete/update
Never existed, this is how: where('field', 'IN', array(1,3))
Comment by
Jelmer Schreuder
August 2011
permalink
ORM: find('all') returning error
The PHP error tells you what is wrong: $thought is not an object. I'm guessing it contains the array of all objects returned and thus is an array and not an object.
Comment by
Jelmer Schreuder
August 2011
permalink
Error handling question (v.1.0)
Actually there is this option as well: throw new Request404Exception(); There is also Request::show_404() for the same thing, but that will be deprecated in v1.1 and removed in the next.
Comment by
Jelmer Schreuder
August 2011
permalink
observer typing and primary key
By design the primary key cannot be changed once set (to ensure there can only be one instance of a db row). As the primary key is set before the observer gets to force typing, the observer can't change the primary key's type anymore. Whi…
Comment by
Jelmer Schreuder
August 2011
permalink
Get fieldset inputs array
// fetch specific field $field = $fieldset->field('username'); // fetch all into associative array $fields = $fieldset->field(); Not the values will be Fieldset_Field objects, but by casting them to string they'll become H…
Comment by
Jelmer Schreuder
July 2011
permalink
Compare Related table column with parent column
Not yet possible, you can add an issue on Github to have it included in v1.1.
Comment by
Jelmer Schreuder
July 2011
permalink
advanced create
$author->books is an array, thus assigning a model to it will cause errors and assigning a property to it wouldn't work either. This is how I'd do it: $author = new Model_Author(); $author->name = Input::post('author_name…
Comment by
Jelmer Schreuder
July 2011
permalink
many to many, and its related rows
@stewart When you start out with "may I hijack this thread" you should realize you're doing something wrong. Don't hijack thread, start your own.
Comment by
Jelmer Schreuder
April 2011
permalink
Inflector::classify result
Docs are out of date, Fuel classes do use underscores except in very rare cases.
Comment by
Jelmer Schreuder
July 2011
permalink
Error on update
And after posting I noticed this: $entry = Input::post('pimg'); Thus you're overwriting the $entry object you created with a posted value. Still that couldn't cause your error as it would have gotten you into problems way bef…
Comment by
Jelmer Schreuder
July 2011
permalink
Error on update
Guys, to both of you, this is something I keep telling people: read the error message! Truly, write it down on a pastie and stick it on the top of your screen. I can't drive this point home enough as it'll save you hours of work if you ju…
Comment by
Jelmer Schreuder
July 2011
permalink
Shorthand functions
It's considered bad, mostly because you're slowing down your app. The error may not be shown but it's still reported and it's still handled by the PHP parser, which is an incredibly inefficient process in comparisson to checking…
Comment by
Jelmer Schreuder
July 2011
permalink
Shorthand functions
The only functions in Fuel are defined in the core/base.php file. Not yet documented though, I'll add an issue on Github about it. What you are trying to do can't be done by Fuel as you want error suppression, but as the variable is fetch…
Comment by
Jelmer Schreuder
July 2011
permalink
orm result
You are overwriting the __construct() method without supporting its native implementation (passing on the args it gets passed to the parent::__construct()), thus hydration of the instances could never work.
Comment by
Jelmer Schreuder
July 2011
permalink
Infinite exception loop
Default setup cannot go wrong, only extending the Core can break things. Which is basicly the point, we can't prevent problems when you're not just exending but actively changing how Fuel works. If you do that you'll have to de…
Comment by
Jelmer Schreuder
July 2011
permalink
Blog module in development: Need input.
I'll probably start work on something similar soon, there's 1 topic on the top of my list: implement anti-spam measures. You need at least solutions for captcha & filtering, if I end up writing these I'll release them as well bu…
Comment by
Jelmer Schreuder
July 2011
permalink
Date class bug
Bug reported on the forums aren't fixed, that's what the issues on Github are for unless someone around here makes the effort to fix & pull-request. We core devs make a point of not accepting bugs here because there's no good way…
Comment by
Jelmer Schreuder
July 2011
permalink
Config "magic": search within the module of the active request first
@WanWizard Does that mean that users always_load-ing a module don't get it prefixed anymore when it's an active request? I think by far most users would prefer it to be prefixed. Also, when using the $force param it gets added a second t…
Comment by
Jelmer Schreuder
July 2011
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
Jelmer Schreuder
Joined
January 2011
Visits
7
Last Active
May 2016
Roles
Administrator