<div dir="ltr"><div>If you can detect the /e flag being used (as suggested by option 1), it would probably be helpful to complain about the recipe which is using it, to make finding the offending script much easier. I agree with John Rankin's idea of a message listing the recipes which are causing the warning, if possible.<br><br></div>I personally would go for option 3 (do nothing), as this is the least surprising option. Randomly breaking recipes are harder to debug than an error message, and disabling error warnings can (as you mentioned) cause similar grief.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 3, 2014 at 4:59 PM, Petko Yotov <span dir="ltr"><<a href="mailto:5ko@5ko.fr" target="_blank">5ko@5ko.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 03.12.2014 22:04, Krait, Philippe wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[Sun Nov 30 07:08:34.<a href="tel:262716%202014" value="+12627162014" target="_blank">262716 2014</a>] [:error] [pid 17719] [client<br>
<a href="http://220.181.108.174:47958" target="_blank">220.181.108.174:47958</a>] PHP Deprecated: preg_replace(): The /e modifier<br>
is deprecated, use preg_replace_callback instead in<br>
/home/philippe/....../pmwiki.<u></u>php on line 1664<br>
</blockquote>
...<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Are the warnings really caused by recipes, as this is core pmwiki code ?<br>
</blockquote>
<br>
Yes. The line 1664 is called when a markup rule is defined. All markup rules in the PmWiki core will not trigger the warning.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am using tons of recipes, and it would really be a pain to go<br>
through all of them to find the one(s) doing this if that is the case.<br>
Or is it still a bug in the pmwiki core itself ?<br>
</blockquote>
<br>
It is not a PmWiki bug and never was. You can disable all recipes and skins and see there are no warnings. Moreover, there are no warnings with PHP 5.4 or older.<br>
<br>
The page Troubleshooting explains how to update your recipes, and/or how to hide the warnings if you like.<br>
<br>
  <a href="http://www.pmwiki.org/Troubleshooting" target="_blank">http://www.pmwiki.org/<u></u>Troubleshooting</a><br>
<br>
I request comments from the community about this.<br>
<br>
First of all, for security reasons it is out of the question to automatically rewrite the eval()ed PHP code in markup definitions.<br>
<br>
I see the following options:<br>
<br>
1. Disable/skip any markup rule with the /e flag so that it doesn't trigger a warning. This will effectively hide the warnings but some recipes will no longer work.<br>
<br>
2. Disable error reporting for E_DEPRECATED warnings. This will hide the warnings, and in most environments the recipes will work as expected, in short term. However, if future PHP versions deprecate other features, the administrators will not see the warnings and will not know they should update their code. It may be something entirely different from the current issue. This sounds easy but as an admin I would strongly dislike if a software changes the error_reporting parameters for me.<br>
<br>
3. Do nothing, let the administrators see the warnings and request that recipe authors update their modules to make them work with PHP 5.5.<br>
<br>
Are there other/better propositions?<br>
<br>
Petko<br>
<br>
<br>
______________________________<u></u>_________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/<u></u>mailman/listinfo/pmwiki-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">The views expressed above are exclusively mine, if anyone's.<br></div></div>
</div>