{"id":19005388,"date":"2026-08-28T09:49:03","date_gmt":"2026-08-28T09:49:03","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/php-8-deprecation-warning-in-upprev\/"},"modified":"2026-08-28T09:49:03","modified_gmt":"2026-08-28T09:49:03","slug":"php-8-deprecation-warning-in-upprev","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/php-8-deprecation-warning-in-upprev\/","title":{"rendered":"PHP 8 deprecation warning in upPrev"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>Hi,<br \/><br \/>I\u2019m seeing repeated PHP 8 deprecation warnings in upPrev:<br \/><br \/><code>preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated<\/code><br \/><br \/>The warning originates from:<br \/><br \/><code>includes\/iworks\/upprev.php<\/code>, method <code>print_custom_style()<\/code><br \/><br \/>The issue appears to be that:<br \/><br \/><code>$this-&gt;options-&gt;get_option( 'css' )<\/code><br \/><br \/>can return <code>null<\/code> and is then passed directly to <code>preg_replace()<\/code>.<br \/><br \/>A possible fix would be to ensure that the value is a string before processing it, e.g.:<br \/><br \/><code>$css = $this-&gt;options-&gt;get_option( 'css' );<\/code><br \/><br \/><code>if ( $css === null ) {<\/code><br \/><code>$css = '';<\/code><br \/><code>}<\/code><br \/><br \/>Could you please check this for a future update?<br \/><br \/>Best regards<br \/>Hansj\u00f6rg<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-19005388","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19005388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19005388\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19005388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}