[PR #9700] Fix warning: bind null value in a BLOB field oci8 #11807

Closed
opened 2026-01-22 16:11:59 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/9700

State: closed
Merged: No


Fixes issue Fixes issue https://github.com/doctrine/orm/issues/9601

When working with optional fields in entity that have a BLOB type (blob, clob, text, ..., etc.), we get a warning:

Deprecated: OCILob::writeTemporary(): Passing null to parameter #1 ($data) of type string is deprecated in vendor/doctrine/dbal/src/Driver/OCI8/Statement.php on line 76

https://www.php.net/manual/ru/ocilob.writetemporary.php

public OCILob::writeTemporary(string $data, int $type = OCI_TEMP_CLOB): bool

The fix replaces the binding type from Blob to String, which allows you to set NULL to this column without calling the method
An example is described in functional test: GH9601Test

**Original Pull Request:** https://github.com/doctrine/orm/pull/9700 **State:** closed **Merged:** No --- Fixes issue Fixes issue https://github.com/doctrine/orm/issues/9601 When working with optional fields in entity that have a BLOB type (blob, clob, text, ..., etc.), we get a warning: `Deprecated: OCILob::writeTemporary(): Passing null to parameter #1 ($data) of type string is deprecated in vendor/doctrine/dbal/src/Driver/OCI8/Statement.php on line 76` https://www.php.net/manual/ru/ocilob.writetemporary.php ```php public OCILob::writeTemporary(string $data, int $type = OCI_TEMP_CLOB): bool ``` The fix replaces the binding type from Blob to String, which allows you to set NULL to this column without calling the method An example is described in functional test: GH9601Test
admin added the pull-request label 2026-01-22 16:11:59 +01:00
admin closed this issue 2026-01-22 16:11:59 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#11807