Advanced Multi Uploader Support Product Page

Solved

Function eregi() is deprecated

Reported 06 Dec 2011 01:40:50
1
has this problem
06 Dec 2011 01:40:50 Andy Simpson posted:
Hi

Currently using:

PHP 5.3.8
Apache 2.2.21
MySQL 5.5.16

On a local test pc and keep receiving the following error message.

Deprecated: Function eregi() is deprecated in line 66.

The snippet of code below is the issue as !eregi is no longer used.

if (isset($editFormAction)) {
if (isset($_SERVER['QUERY_STRING'])) {
if (!eregi("GP_upload=true", $_SERVER['QUERY_STRING'])) {
$editFormAction .= "&GP_upload=true";

Any help on this would be great as I cannot find how to fix this. Many thanks.

Official Solution

Replied 06 Dec 2011 10:07:17
Hello Andy,

Please replace:

if (!eregi("GP_upload=true",


with

if (!preg_match("/GP_upload=true/i",

Replies

Replied 06 Dec 2011 10:07:17
06 Dec 2011 10:07:17 Teodor Kuduschiev replied:
Hello Andy,

Please replace:

if (!eregi("GP_upload=true",


with

if (!preg_match("/GP_upload=true/i",

Reply to this topic