j4mie / idiorm

A lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5.
http://j4mie.github.com/idiormandparis/
2.01k stars 369 forks source link

line 221 and is_object - undefined index. #99

Closed rezakazemi closed 11 years ago

rezakazemi commented 11 years ago

I might be out to lunch here, but I'm getting an 'Undefined index: default' on line 221.

I'm sure others who don't suppress notices also have this issue.

I believe that changing the !is_object to a !isset (or at the very least checking for the existence of the 'default' connection within $_db by using 'array_key_exists' and THEN seeing if it's a PDO object) would be a better solution.

thoughts?

(otherwise, i love this ORM/AR combo of idiorm and paris).

treffynnon commented 11 years ago

Please can you try the new patch and confirm it resolves the issue you are having. Thanks!

rezakazemi commented 11 years ago

Looks good!

treffynnon commented 11 years ago

Great! Thanks for your feedback.