FirebirdSQL / php-firebird

Firebird PHP driver
Other
66 stars 15 forks source link

Fix and re-enable tests/007.phpt #42

Open Jon4t4n opened 1 year ago

Jon4t4n commented 1 year ago

tests/007phpt was disabled in PR #39. We want to fix this and re-enable the test.

MartinKoeditz commented 1 year ago

Two issues fixed.

  1. Precision of PHP has to be set to correct value. Set it to 18 via ini_set().
  2. Since PHP 8.1: Deprecated: Implicit conversion from float-string to int loses precision. Corrected to explicit conversion.

See https://github.com/FirebirdSQL/php-firebird/commit/2a6bf543c96079312245994ef25336bd09c662ec

Jon4t4n commented 1 year ago

It is hard to say if the changes here are causing the CI failures or if the changes in #40 also play a role. But we hit an assert here that we did not hit in the CI run on the previous commit.

Zend/zend_hash.c:2305: zend_hash_internal_pointer_reset_ex: Assertion `(&ht->nInternalPointer != pos || zend_gc_refcount(&(ht)->gc) == 1) || ((ht)->u.flags & (1<<6))

CI: https://github.com/FirebirdSQL/php-firebird/actions/runs/4058233486/jobs/6984923000#step:6:160

(I recommend creating a PR to kick off a CI build before landing commits on master. To prevent the master branch from being in a broken state.)