| Index
» Projects
» phpMyEdit
» Forum
» bug: set_magic_quotes_runtime(0) deprecated under PHP 5.3.1 |
 |
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2010-01-25 20:21
Back to top
Reply with quote
|
Using PHP 5.3.1 the following message is displayed, presumably because magic quotes are going to be discontinued at some point. Or perhaps there are some functions that are disabled in my PHP development environment.
Error message:
| Code: |
| Function set_magic_quotes_runtime() is deprecated in phpMyEdit.class.php |
The offending code in phpMyEdit.class.php is
| Code: |
// Let's do explicit quoting - it's safer
set_magic_quotes_runtime(0);
// Checking if language file inclusion was successful
if (! is_array($this->labels)) {
$this->error('could not locate language files', 'searched path: '.$this->dir['lang']);
return false;
}
// Database connection
if ($this->connect() == false) {
return false;
} |
Temporary work-around is to prefix set_magic_quotes_runtime(0); as @set_magic_quotes_runtime(0);
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2010-01-27 04:17
Back to top
Reply with quote
|
Using PHP 5.3 the following issues a "deprecated" warning.
| Code: |
| $value = ereg_replace("[\r\n\t ]+",' ',$value); |
Does anyone know the exact replacement using preg_replace()?
|
vlad88sv
Joined: 25 Jan 2010
Posts: 3
Posted: 2010-04-09 00:17
Back to top
Reply with quote
|
It's preg_replace(), but does not work the exact same way as results are dropped into an array provided in the parameters.
Also REGEX expression is not the same.
Look at it in
http://php.net/manual/en/function.preg-replace.php
Btw, thanks for great sofware, I've been using PME sucesfully at
flor360.com
|
|
Post new topic
Reply to topic
|
|
|
|