Title: PHP Deprecated: preg_replace(): Passing null to parameter #3 ..
Last modified: March 25, 2024

---

# PHP Deprecated: preg_replace(): Passing null to parameter #3 ..

 *  Resolved [Ov3rfly](https://wordpress.org/support/users/ov3rfly/)
 * (@ov3rfly)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/php-deprecated-preg_replace-passing-null-to-parameter-3/)
 * Getting lots of these entries in `debug.log`
 *     ```wp-block-code
       [25-Mar-2024 16:34:44 UTC] PHP Deprecated:  preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in ../wp-includes/formatting.php on line 4813
       ```
   
 * Reason is `tag_escape()` call with `null` as parameter in `list-category-posts/
   include/lcp-catlistdisplayer.php` line 264:
 *     ```wp-block-code
       $tag = tag_escape($this->params['title_tag']) ?: tag_escape($tag);
       ```
   
 * List category posts 0.89.8, WordPress 6.4.3, PHP 8.1.x

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * (@zymeth25)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/php-deprecated-preg_replace-passing-null-to-parameter-3/#post-17528288)
 * Thanks for reporting, the fix will be included in the next release. Meanwhile,
   if you want to get it sooner feel free to download the development version from
   [Github](https://github.com/picandocodigo/List-Category-Posts).
 *  Thread Starter [Ov3rfly](https://wordpress.org/support/users/ov3rfly/)
 * (@ov3rfly)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/php-deprecated-preg_replace-passing-null-to-parameter-3/#post-17531582)
 * Thanks for quick response. Issue is fixed with [this commit](https://github.com/picandocodigo/List-Category-Posts/commit/f18600632b3b9d428efa77bf4b03d867bfe8c106)
   at GitHub.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Deprecated: preg_replace(): Passing null to parameter #3 ..’ is closed
to new replies.

 * ![](https://ps.w.org/list-category-posts/assets/icon-256x256.png?rev=2517221)
 * [List category posts](https://wordpress.org/plugins/list-category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/list-category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/list-category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/list-category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-category-posts/reviews/)

## Tags

 * [PHP Deprecated](https://wordpress.org/support/topic-tag/php-deprecated/)
 * [preg_replace](https://wordpress.org/support/topic-tag/preg_replace/)

 * 2 replies
 * 2 participants
 * Last reply from: [Ov3rfly](https://wordpress.org/support/users/ov3rfly/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/php-deprecated-preg_replace-passing-null-to-parameter-3/#post-17531582)
 * Status: resolved