multiple deprecated warnings on live site

Open to all! Ask other shopowners for help.
Post Reply
User avatar
Portman
Contributor
Posts: 158
Joined: Mon Mar 08, 2021 1:04 am
Phoenix Version: v1.0.8.20
Has thanked: 29 times
Been thanked: 4 times

multiple deprecated warnings on live site

Post by Portman »

Hi,

I have just noticed that I am getting multiple deprecated warnings onmy site since I went live... I was not getting these warnings on my dev site, and I am not sure if this is a big problem or not - but it is packing my error log full of warnings...

It Seems to be this on repeat;

Code: Select all

PHP Deprecated:  Return type of database_core::query($sql, $resultmode = MYSQLI_STORE_RESULT) should either be compatible with mysqli::query(string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.1/database_core.php on line 61
PHP Deprecated:  Return type of Href::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.5/href.php on line 145
PHP Deprecated:  Return type of mysql_session::open($save_path, $session_name) should either be compatible with SessionHandler::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/../includes/system/versioned/1.0.8.3/mysql_session.php on line 27
PHP Deprecated:  Return type of mysql_session::close() should either be compatible with SessionHandler::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 15
PHP Deprecated:  Return type of mysql_session::read($key) should either be compatible with SessionHandler::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 31
PHP Deprecated:  Return type of mysql_session::write($key, $value) should either be compatible with SessionHandler::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 47
PHP Deprecated:  Return type of mysql_session::destroy($key) should either be compatible with SessionHandler::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 19
PHP Deprecated:  Return type of mysql_session::gc($maxlifetime) should either be compatible with SessionHandler::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 23
PHP Deprecated:  Return type of mysql_session::validateId($key) should either be compatible with SessionUpdateTimestampHandlerInterface::validateId(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 42
PHP Deprecated:  Return type of mysql_session::updateTimestamp($key, $ignore) should either be compatible with SessionUpdateTimestampHandlerInterface::updateTimestamp(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 38
Any thoughts on what could be causing this and if it is a major issue that I need to be worried about?


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: multiple depreciated warnings on live site

Post by burt »

It is always best to NOT have stuff written to the error_log, and the error here tells you what to do, eg (the bolded bit);

PHP Deprecated: Return type of mysql_session::updateTimestamp($key, $ignore) should either be compatible with SessionUpdateTimestampHandlerInterface::updateTimestamp(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/.../includes/system/versioned/1.0.8.3/mysql_session.php on line 38

So you should now post the code here,, from the following file;
/includes/system/versioned/1.0.8.3/mysql_session.php
so that we can see the file.

inside CODE tags. Click the </> button to get CODE tags, in the menu above the post.
I am not here to build for you.
I am here to build with you. Let's help each other.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: multiple deprecated warnings on live site

Post by ecartz »

Or just tell us what version of Phoenix you're using. This should be correct in 1.0.8.21 or newer. So updating to 1.0.9.0 should fix it. Or just copy mysql_session, database_core, and href from 1.0.9.0 or newer.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply