Thanks Oracle,

Followed your direction, and fixed a few bugs in some core files.
Found a few unintialized variables.

And the one that really explains everything is this one.

Notice: Object of class queryFactoryResult could not be converted to int in Unknown on line 0
Any ideas?

Anyone?