Question

UPDATE: Krumo seems to be outdated, and I discovered Kint, which does everything I wanted out of Krumo.

I started a CI site that uses PHP ActiveRecord. Please note: PHP ActiveRecord is not the same as CI ActiveRecord.

ActiveRecord works great; more than I hoped for.

I then added Krumo, which also works great, sometimes; Krumo works properly unless I run Krumo on an ActiveRecord object.

print_r($this->user); // Works
krumo($this->user); // Does not work

The output for the krumo() call is:

Fatal error: Uncaught exception 'ActiveRecord\UndefinedPropertyException' with message 'Undefined property: User_model->krumo50afd2e8f24af in /Users/ted/Sites/cnc/sparks/php-activerecord/0.0.2/vendor/php-activerecord/lib/Model.php on line 514' in /Users/ted/Sites/cnc/sparks/php-activerecord/0.0.2/vendor/php-activerecord/lib/Model.php:514 Stack trace: #0 /Users/ted/Sites/cnc/sparks/php-activerecord/0.0.2/vendor/php-activerecord/lib/Model.php(333): ActiveRecord\Model->read_attribute('krumo50afd2e8f2...') #1 /Users/ted/Sites/cnc/application/libraries/krumo/Krumo.php(951): ActiveRecord\Model->__get('krumo50afd2e8f2...') #2 /Users/ted/Sites/cnc/application/libraries/krumo/Krumo.php(1104): krumo::_vars(Object(User_model)) #3 /Users/ted/Sites/cnc/application/libraries/krumo/Krumo.php(789): krumo::_object(Object(User_model), '...') #4 /Users/ted/Sites/cnc/application/libraries/krumo/Krumo.php(584): krumo::_dump(Object(User_model)) #5 [internal function]: krumo::dump(Object(User_model)) #6 /Users/ted/Sites/cnc/application/librarie in /Users/ted/Sites/cnc/sparks/php-activerecord/0.0.2/vendor/php-activerecord/lib/Model.php on line 514

It would be wonderful if I could get these two to work together. Anyone have any ideas?

Était-ce utile?

La solution

Just went through description, looks like you can just use xdebug it would nicely color output your regular var_dump;

Looks also like krumo is outdated and unsupported. I would not use such a library

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top