{"id":11510622,"date":"2019-05-08T19:29:15","date_gmt":"2019-05-08T19:29:15","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/exec-php-error-php-becomes-php\/"},"modified":"2019-05-08T19:39:47","modified_gmt":"2019-05-08T19:39:47","slug":"exec-php-error-php-becomes-php","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/exec-php-error-php-becomes-php\/","title":{"rendered":"Exec-PHP error: &lt;?php becomes &lt; ?php"},"content":{"rendered":"<p>My WP version = 5.1.1<br \/>\nMy PHP version = 5.2.4<\/p>\n<p>This isn&#8217;t really an exec-php problem.  PHP opening tags are getting munged.<\/p>\n<p>A recent update to WordPress caused this problem &#8211; not sure which version.<\/p>\n<p>In a multi-post page view of posts that include the &lt;!&#8211;more&#8211;&gt; tag, the opening tag for PHP was getting corrupted with an added space between &lt; and ?php.  If you viewed the offending post by itself, the error would go away.<\/p>\n<p>There&#8217;s probably a more elegant way to fix this, but here&#8217;s my solution:<\/p>\n<p><strong>Edit:<\/strong> wp-includes\/formatting.php file<br \/>\n<strong>After line 2558:<\/strong> $newtext = str_replace( &#8216;&lt;    !&#8211;&#8216;, &#8216;&lt; !&#8211;&#8216;, $newtext );<br \/>\n<strong>Add:<\/strong> $newtext = str_replace(&#8216;&lt; ?php&#8217;,'&lt;?php&#8217;,$newtext);<\/p>\n","protected":false},"template":"","class_list":["post-11510622","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11510622","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":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11510622\/revisions"}],"predecessor-version":[{"id":11510646,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11510622\/revisions\/11510646"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=11510622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}