kohana / database

A Kohana module for database interactions, building queries, and prepared statements
http://kohanaframework.org/documentation
158 stars 140 forks source link

Passing NULL to argument 3 of mysql_fetch_object has undefined behavior ... #73

Closed kwhat closed 10 years ago

kwhat commented 10 years ago

Passing NULL to argument 3 of mysql_fetch_object has undefined behavior and is not functionally equal to not passing a 3rd argument. This seems to effect php 5.3 but not php 5.5. A bug report was never created. This resolves issues like %S does not have a constructor hence you cannot use ctor_params.

enov commented 10 years ago

Dear @kwhat , I can not merge directly into master, so kindly re-target this towards 3.3/develop.

So, you're saying:

mysql_fetch_object($result, $as_object, NULL);

behaves differently than

mysql_fetch_object($result, $as_object);

on some version of PHP?

Could you add some comments about this inside the code above the if fork?

Also could you link me to some test or resource where I can read more about this?

Thanks for your time reporting this. I'll close once we have the new PR.

kwhat commented 10 years ago

Please see request #74