Author Topic: A lot of PHP "Deprecated" error in the log that I didn't understand  (Read 3268 times)

Offline Lungo

  • Newbie
  • *
  • Posts: 2
Hi everybody,
I got a lot of PHP "Deprecated" errors of various type on log. The examples follow:

[16-Dec-2022 20:12:24 Europe/Rome] PHP Deprecated:  Return type of rcube_result_set::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ************\webmail\program\lib\Roundcube\rcube_result_set.php on line 123
[16-Dec-2022 20:12:24 Europe/Rome] PHP Deprecated:  Return type of rcube_result_set::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ************\webmail\program\lib\Roundcube\rcube_result_set.php on line 133
[16-Dec-2022 20:12:24 Europe/Rome] PHP Deprecated:  Return type of rcube_result_set::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ************\webmail\program\lib\Roundcube\rcube_result_set.php on line 128
[16-Dec-2022 20:12:24 Europe/Rome] PHP Deprecated:  Return type of rcube_result_set::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ************\webmail\program\lib\Roundcube\rcube_result_set.php on line 138
[16-Dec-2022 20:12:24 Europe/Rome] PHP Deprecated:  Return type of rcube_result_set::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ************\webmail\program\lib\Roundcube\rcube_result_set.php on line 118
[16-Dec-2022 20:12:24 Europe/Rome] PHP Deprecated:  Return type of rcube_result_set::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ************\webmail\program\lib\Roundcube\rcube_result_set.php on line 101
[16-Dec-2022 20:12:24 Europe/Rome] PHP Deprecated:  Return type of rcube_result_set::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ************\webmail\program\lib\Roundcube\rcube_result_set.php on line 111
[16-Dec-2022 20:12:24 Europe/Rome] PHP Deprecated:  Return type of rcube_result_set::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ************\webmail\program\lib\Roundcube\rcube_result_set.php on line 90
[16-Dec-2022 20:12:24 Europe/Rome] PHP Deprecated:  Return type of rcube_result_set::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ************\webmail\program\lib\Roundcube\rcube_result_set.php on line 106
[16-Dec-2022 20:12:24 +0100]: <jelqrs77> DB Error: [1452] Cannot add or update a child row: a foreign key constraint fails (`roundcubemail`.`rncb_collected_addresses`, CONSTRAINT `user_id_fk_collected_addresses` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE) (SQL Query: INSERT INTO `RNCB_collected_addresses` (`user_id`, `changed`, `type`, `name`, `email`) VALUES ('20', now(), '1', 'Marco Lungo', 'marco.lungo@tin.it')) in ************\webmail\program\lib\Roundcube\rcube_db.php on line 566 (POST /webmail/?_task=mail&_unlock=loading1671217940587&_framed=1&_action=send)
[16-Dec-2022 20:12:25 Europe/Rome] PHP Deprecated:  preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in ************\webmail\program\lib\Roundcube\bootstrap.php on line 329
[16-Dec-2022 20:12:25 Europe/Rome] PHP Deprecated:  strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in ************\webmail\program\include\rcmail_action.php on line 1221
[16-Dec-2022 20:12:25 Europe/Rome] PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in ************\webmail\program\actions\mail\index.php on line 181
[17-Dec-2022 00:18:37 Europe/Rome] PHP Deprecated:  preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in ************\webmail\program\lib\Roundcube\bootstrap.php on line 329
[17-Dec-2022 00:18:37 Europe/Rome] PHP Deprecated:  strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in ************\webmail\program\include\rcmail_action.php on line 1221
[17-Dec-2022 00:18:37 Europe/Rome] PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in ************\webmail\program\actions\mail\index.php on line 181

The server runs:
Windows Server 2022
PHP 8.1.5
Apache 2.52
MariaDB 10.5
Roundcube 1.6 (?) maybe...

Thanks to all who try to help me to resolve the issue
Marco