In Progress CPANEL-40314 - Round cube mass PHP deprecated warnings in PHP Error Log

Operating System & Version
CentOS 7.9 / Virtuozzo Kernal 3.10.0-1160.21.1.vz7.174.13 / httpd (2.4.52)
cPanel & WHM Version
102.0 (build 2)

The Old Man

Well-Known Member
Feb 24, 2016
80
21
58
UK
cPanel Access Level
Root Administrator
WHM/Cpanel 102.0.2

Found in my .php.error.log file in root logs folders are full of depreciated PHP notices/warnings being constantly generated (multiple per second):


Code:
[14-Feb-2022 09:19:31 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:31 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:33 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:33 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:35 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:35 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:35 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:35 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:43 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:43 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:43 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:43 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:49 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:49 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:49 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:19:49 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:20:15 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:20:15 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:20:16 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[14-Feb-2022 09:20:16 Europe/London] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,360
1,628
363
cPanel Access Level
Root Administrator
Hey there! I couldn't reproduce this issue on a test system, although that machine didn't likely have much email or calendar activity. Would you be able to submit a ticket to our team so we can check this out? If you can get that ticket submitted, please post the number here so I can follow along and make sure this thread gets updated.
 

The Old Man

Well-Known Member
Feb 24, 2016
80
21
58
UK
cPanel Access Level
Root Administrator
Hi @cPRex Thanks, no problem, but I thought I better check first and it looks like it stopped for some reason at 12:57 14/02/22. It started and began repeating at 09:19 14/02/22. I rarely use Roundcube either. Never the calendar. Is it still worth a ticket?
 

speckados

Well-Known Member
I've reopened tis post, because I've get same error (and others) with roundcube

Server running latest version on WHM /CPANEL 102.0.8 on Centos 7

Code:
[29-Mar-2022 09:33:50 Europe/Madrid] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[29-Mar-2022 09:33:50 Europe/Madrid] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[29-Mar-2022 09:33:50 Europe/Madrid] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[29-Mar-2022 09:33:50 Europe/Madrid] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[29-Mar-2022 09:33:50 Europe/Madrid] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[29-Mar-2022 09:33:50 Europe/Madrid] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[29-Mar-2022 09:33:50 Europe/Madrid] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
[29-Mar-2022 09:33:50 Europe/Madrid] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /usr/local/cpanel/base/3rdparty/roundcube/plugins/carddav/carddav.php on line 356
 

aUserName

Member
Sep 15, 2016
15
5
53
Tubes
cPanel Access Level
Root Administrator
This is really, very straight forward. No need to even test an affected system.
It is a PHP Deprecation notice and the problem is spelled out in the message.

Still want to test it? Do this:
Ensure WHM/cPanel version is 102. major version.
Copy the file path from the error message posted and navigate to your Terminal in WHM.
Open the php file in any text editor.
Navigate to the line given in the message (line 356) and you will see a long string of code that uses the now Deprecated syntax the error is talking about.

Why is this happening?
Put simply, cPanel updated the PHP version that runs cpanel core services, and had not updated all of the existing PHP code to comply with new deprecation warnings.
Deprecation doesn't mean "it's broken" just that in the future it may become broken.

How do we fix this?
1.) Users of WHM/cPanel can effectively do nothing to fix it, just wait for an update. Alternatively, if you're comfy with PHP, and have the time to spare, you can edit the file and correct the minor syntax issue.

2.) WHM/cPanel devs need to update the 3rd-party app to address the deprecation issues. Which really means they should update PHPCS or whatever other CI checks they use to inform them of Deprecation notices and ensure those are sent to up-stream maintainers to be addressed before they push such updates.

Does this break anything?
No. Nothing is broken by these notices. Functionality remains the same. Performance impacts vary by system and I/O limits, but should not be noticeable from this notice being issued.
 
  • Like
Reactions: cPRex