Getting the following error when doing anything on PHP 8.1.4, redbean version 5.7.1.
Internal Server Error
trim(): Passing null to parameter #1 ($string) of type string is deprecated
I was able to fix it by replacing:
if ( trim( $sql ) === '' ) { with: if ( is_null($sql) || trim( $sql ) === '' ) {
in the main glueSQLCondition function within the main redbean php file, line 6191.
Getting the following error when doing anything on PHP 8.1.4, redbean version 5.7.1.
I was able to fix it by replacing:
if ( trim( $sql ) === '' ) {
with:if ( is_null($sql) || trim( $sql ) === '' ) {
in the mainglueSQLCondition
function within the main redbean php file, line 6191.Fix credit from closed issue here: https://github.com/gabordemooij/redbean/issues/871#issuecomment-1042222561