Home » Database » DB_DataObject » Bug #4760
DB_DataObject_Cast fails on blob insert.
Details
| Submitted | 2005-07-06 19:32 UTC |
|---|---|
| From | einurech at bluewin dot ch |
| Assigned | alan_k |
| Status | Closed |
| Package | DB_DataObject |
| PHP Version | Irrelevant |
| OS | Windows XP |
| Roadmaps | (Not assigned) |
Comments
[2005-07-06 19:32 UTC] einurech at bluewin dot ch
Description:
------------
version 1.7.14
Trying an $object->insert() which has a DB_DataObject_Cast::blob($s) property fails, error message:
Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in D:\svn\dfc\gym\trunk\pear\DB\DataObject\Cast.php on line 392
The code worked well in the last release 1.7.13.
Reproduce code:
---------------
I found the error being caused by an empty $DB object (caused by a typo?) in
function toStringFromBlob() and
function toStringFromString()
Lines 388, 392, 432, 436 should use
$db->connection instead of
$DB->connection