FAQ | This is a LIVE service | Changelog

Skip to content

Fix error in edit view on NULL oid

Dr Catherine Pitt requested to merge maths into master

Chemistry still uses large objects for its image storage. On PHP 8.1 when going into edit view for a row with an oid column we get

PHP Fatal error: Uncaught TypeError: pg_lo_read_all(): Argument #1 ($lob) must be of type PgSql\Lob, bool given in /var/www/hotwire3/dev/chem/dbdev/chemistry/classes/dbDispOid.php

This change checks the return value of pg_lo_open() isn't FALSE before trying to use it.

Merge request reports