Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  phpMyEdit on PHP 5.4

phpMyEdit General     phpMyEdit on PHP 5.4
Post new topic   Reply to topic    
 
Atara.H     Joined: 23 Jul 2014   Posts: 11  
Post Posted: 2014-07-23 09:49
Back to top  Reply with quote     

Recently our host upgraded from PHP 5.2 to PHP 5.4

I did the following changes in the code, please let me know if I missed something:

1 - set_magic_quotes_runtime() - deprecated in PHP 5.4 - remove/comment this line.

2 - ereg_replace() - deprecated in PHP 5.4 - Can be changed to preg_replace():
$value = ereg_replace("[\r\n\t ]+",' ',$value);
=>
$value = preg_replace("/[\\r\\n\\t ]+/",' ',$value);

The proposed code might need more testing.
[based on http://stackoverflow.com/questions/2443895/ereg-replace-to-preg-replace]

3 - htmlspecialchars() - in PHP 5.4 the default encoding used by htmlspecialchars() was changed, so I added our encoding, 'ISO-8859-1'. [see also http://opensource.platon.org/forum/projects/viewtopic.php?t=10785766]

[based on http://php.net/manual/en/function.htmlspecialchars.php + Dave's comment there]

Thank you for this useful tool.

Atara

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy