[wp-trac] [WordPress Trac] #55119: Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/peoplesofthesalmon/public_html/wp-includes/block-supports/layout.php on line 167

WordPress Trac noreply at wordpress.org
Tue Feb 8 20:16:35 UTC 2022


#55119: Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type
string is deprecated in /home/peoplesofthesalmon/public_html/wp-includes
/block-supports/layout.php on line 167
--------------------------+-----------------------------
 Reporter:  oneearth27    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi,

 Running WP 5.9 and upon visiting the website, am now getting several
 repetitions of the same message:

 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type
 string is deprecated in /home/peoplesofthesalmon/public_html/wp-includes
 /block-supports/layout.php on line 167

 Also in the dashboard, there are some repetitions of the same message (the
 first part of the message seems to be blocked by the black left column):

 null to parameter #1 ($string) of type string is deprecated in
 /home/peoplesofthesalmon/public_html/wp-includes/formatting.php on line
 2761

 You can reproduce the problem when you visit
 https://peoplesofthesalmon.org

 The problem occurs even when all the plugins are deactivated. The default
 2022 theme is being used.

 It may be related to some changes I made to the server when I switched
 from php8.1-fpm port connection to Unix socket connection. The website is
 currently using a Unix socket. I am running Debian 10, using Virtualmin
 6.17 as a control panel, with nginx 1.21, with PHP7.1, 7.3, 8.1 available
 for use. The peoplesofthesalmon.org is running on PHP8.1.

 Initially the Unix socket connection didn't work and the Unix socket
 ownership would switch back to root after a systemctl restart php8.1-fpm.

 So I added the nginx owner, www-data, in the
 /usr/lib/systemd/system/php8.1-fpm.service under the [Service] section,
 adding both User=www-data and Group=www-data.

 I also had to change the owner of the /var/log/php8.1-fpm.log from root to
 www-data in order to get the website to show.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55119>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list