yajra / pdo-via-oci8

PHP PDO_OCI functions via OCI8 extension
Other
88 stars 61 forks source link

Call to a member function save() on null #119

Open rvaldebenito35 opened 1 year ago

rvaldebenito35 commented 1 year ago

Hi! I'm just getting following error after executing a store procedure... Call to a member function save() on null on line \vendor\yajra\laravel-pdo-via-oci8\src\Pdo\Oci8\Statement.php:735

// Save blob objects if set.
if ($result && count($this->blobObjects) > 0) {
    foreach ($this->blobObjects as $param => $blob) {
        /* @var OCILob $blob */
        $blob->save($this->blobBindings[$param]);
    }
}

It's happening when the param is set but the output retrieved is empty... It looks like is missing a isset before save... I reported in case someone else has the same issue...

// Save blob objects if set.
if ($result && count($this->blobObjects) > 0) {
    foreach ($this->blobObjects as $param => $blob) {
        /* @var OCILob $blob */
        if(isset($this->blobBindings[$param])){
            $blob->save($this->blobBindings[$param]);
        }
    }
}
yajra commented 1 year ago

@rvaldebenito35 thanks for reporting, can you please provide some snippets to reproduce the issue?