Compatibility issue - PHP 8.1 gives PHP Deprecated messages and PHP 8.0 gives PHP Warning messages

Dear Team and Community,
After we upgraded our OJS from 3.3.0-13 to 3.3.0-14. everything is working fine except the log file are keep loading these deprecation messages in PHP 8.1 and warning messages in case we downgrade to PHP 8.0. which make the size of the log file very large. I’m just confused what should I do with them and which one should I use 8.0 or 8.1. as shown in the messages below.
How can I solve this issue?
You help is highly apricated.
Kind Regards,

For OJS 3.3.0-14 and PHP 8.0.x

[17-Feb-2023 18:43:44 Asia/Baghdad] PHP Warning:  Attempt to read property "single" on null in /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/Rendering/Date/DatePart.php on line 227
[17-Feb-2023 18:47:34 Asia/Baghdad] PHP Warning:  Attempt to read property "single" on null in l/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/Rendering/Date/DatePart.php on line 227
[17-Feb-2023 18:52:02 Asia/Baghdad] PHP Warning:  Attempt to read property "single" on null in /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/Rendering/Date/DatePart.php on line 227

For OJS 3.3.0-14 and PHP 8.1.x

[17-Feb-2023 18:08:50 Asia/Baghdad] PHP Deprecated:  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in  /public_html/plugins/generic/dublinCoreMeta/DublinCoreMetaPlugin.inc.php on line 155
[17-Feb-2023 18:08:56 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 26
[17-Feb-2023 18:08:56 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::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  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 61
[17-Feb-2023 18:08:56 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::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  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 38
[17-Feb-2023 18:08:56 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::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  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 49
[17-Feb-2023 18:08:56 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::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  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 71
[17-Feb-2023 18:08:56 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 79
[17-Feb-2023 18:08:56 Asia/Baghdad] PHP Deprecated:  Return type of MyCLabs\Enum\Enum::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/myclabs/php-enum/src/Enum.php on line 246
[17-Feb-2023 18:08:56 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\CiteProc\Rendering\Date\DateTime::setDate($year, $month, $day) should either be compatible with DateTime::setDate(int $year, int $month, int $day): DateTime, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/Rendering/Date/DateTime.php on line 89
[17-Feb-2023 18:08:56 Asia/Baghdad] PHP Deprecated:  json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in  /public_html/plugins/generic/citations/CitationsPlugin.inc.php on line 49
[17-Feb-2023 18:09:10 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 26
[17-Feb-2023 18:09:10 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::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  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 61
[17-Feb-2023 18:09:10 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::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  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 38
[17-Feb-2023 18:09:10 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::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  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 49
[17-Feb-2023 18:09:10 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::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  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 71
[17-Feb-2023 18:09:10 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\Collection\ArrayList::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/ArrayList/ArrayAccessTrait.php on line 79
[17-Feb-2023 18:09:10 Asia/Baghdad] PHP Deprecated:  Return type of MyCLabs\Enum\Enum::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/myclabs/php-enum/src/Enum.php on line 246
[17-Feb-2023 18:09:10 Asia/Baghdad] PHP Deprecated:  Return type of Seboettg\CiteProc\Rendering\Date\DateTime::setDate($year, $month, $day) should either be compatible with DateTime::setDate(int $year, int $month, int $day): DateTime, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in  /public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/Rendering/Date/DateTime.php on line 89
[17-Feb-2023 18:09:10 Asia/Baghdad] PHP Deprecated:  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in  /public_html/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 36
[17-Feb-2023 18:09:10 Asia/Baghdad] PHP Deprecated:  json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in  /public_html/plugins/generic/citations/CitationsPlugin.inc.php on line 49
[17-Feb-2023 18:09:17 Asia/Baghdad] PHP Deprecated:  stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in  /public_html/lib/pkp/classes/citation/Citation.inc.php on line 99
[17-Feb-2023 18:09:17 Asia/Baghdad] PHP Deprecated:  stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in  /public_html/lib/pkp/classes/citation/Citation.inc.php on line 99
[17-Feb-2023 18:09:17 Asia/Baghdad] PHP Deprecated:  stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in  /public_html/lib/pkp/classes/citation/Citation.inc.php on line 99
[17-Feb-2023 18:09:17 Asia/Baghdad] PHP Deprecated:  stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in  /public_html/lib/pkp/classes/citation/Citation.inc.php on line 99
[17-Feb-2023 18:09:17 Asia/Baghdad] PHP Deprecated:  stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in  /public_html/lib/pkp/classes/citation/Citation.inc.php on line 99

Hi @Salam_Al-Khammasi,

I see several third-party pieces of code that are causing warnings:

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Many thanks @asmecher for your quick response. That’s really solve the problem for PHP 8.0.x
I will try to contact the authors to resolve the warnings in case we want to upgrade to PHP 8.1.x

1 Like

This topic was automatically closed after 9 days. New replies are no longer allowed.