"Trying to get a property of a non-object"
errors, while the variable is definitely an object. (Xdebugged and all, they are objects)$id
to something like "19"
in the Orm query. Ok weird.\Form::textarea('title', 'content', array('class' => 'someclass'));
the errors were gone.html_tag()
method in base.php
and if I change the output there: no errors. Weird./* CONTROLLER */
public function action_edit($id = null) {
$fake_id = "18";
var_dump($fake_id === $id); // true
$foo = Model_Artist::find($id);
$foo->id; // error
$bar = Model_Artist::find($fake_id);
$bar->id; // no error
/* snip */
$view = View::forge('admin/artist/edit');
$this->template->content = $view;
}
/* VIEW */
// remove the array here: no errors above
<?php echo Form::textarea('description', Input::post('description', isset($artist) ? $artist->description : ''), array('class' => 'span10 editor', 'rows' => 8)); ?>
object(Model_Artist)[38] ... object(Model_Artist)[38]
ERROR - 2013-09-03 10:44:22 --> 8 - Trying to get property of non-object in /var/www/fuel/app/classes/controller/admin/artist.php on line 110This shows only once. (Of course if I duplicate that line, it shows twice ;) but the other line with $fake_id has no errors)
class Model_Artist extends \Orm\Model
It looks like you're new here. If you want to get involved, click one of these buttons!