We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Fatal error: Declaration of Phalcon\Db\Dialect\MysqlExtended

Hello. How to fix this please?

Fatal error: Declaration of Phalcon\Db\Dialect\MysqlExtended::getSqlExpression(array $expression, $escapeChar = NULL, $bindCounts = NULL) must be compatible with Phalcon\Db\Dialect::getSqlExpression(array $expression, ?string $escapeChar = NULL, $bindCounts = NULL): string in /mnt/cluster/www/dev/redeopen-php/phalcon/Db/Dialect/MysqlExtended.php on line 175

The function definition in your custom code:

getSqlExpression(array $expression, $escapeChar = NULL, $bindCounts = NULL)

Doesn't match the interface your implementing (or class your extending):

getSqlExpression(array $expression, ?string $escapeChar = NULL, $bindCounts = NULL): string

Namely getSqlExpression() must return a string, and the $escapeChar argument must be a string or null.