paragonie / ciphersweet

Fast, searchable field-level encryption for PHP projects
https://ciphersweet.paragonie.com
Other
437 stars 32 forks source link

setTypedIndexes / error #96

Open Link2Trials opened 12 months ago

Link2Trials commented 12 months ago

In php 7.4 and 8.1 it worked well but version 4.5.1 does not work with php 8.2.12

When using 7.4- 8.1 the lat indexes are on by default: (encryptedRow)

array(2) { ["contact_ssn_last_four"]=> array(2) { ["type"]=> string(13) "3dywyifwujcu2" ["value"]=> string(4) "2acb" } ["contact_ssn"]=> array(2) { ["type"]=> string(13) "2iztg3wbd7j5a" ["value"]=> string(8) "311314c1" } }

but in 4.5.1 not (maybe also earlier versions)

adding $ssn->setTypedIndexes(true); doesnt work

also we get an FATAL EXCEPTION: TypeError - Cannot access offset of type string on string somewhere in the library

EDIT: it only works when i put true as the third option in the contructor... then it works and the fatalexception is gone ... even when i editted the way i get the value from the array the fatal exception was there

paragonie-security commented 12 months ago

These are simple getters and setters, and the property is defined as a bool, so it's not clear to us what the problem is.

Can you produce a minimum test case that causes this behavior?