Topic: error log eregi in Cutenews 1.4.6

Hi Trying to find deprecated code that will result in failure under PHP 7not just a warning.  I have this error eregi line 54 in shows.inc.php deprecated: Code:

        if(!eregi("<\?",$member_db_line)){
                $user_arr = explode("|",$user);
                        if($user_arr[4] != "")
                            {
                                    if($user_arr[7] != 1 and $user_arr[5] != ""){ $my_names[$user_arr[2]] = "<a href=\"mailto:$user_arr[5]\">$user_arr[4]</a>"; }
                                        else{ $my_names[$user_arr[2]] = "$user_arr[4]"; }
                    $name_to_nick[$user_arr[2]] = $user_arr[4];
                            }
                                else
                            {
                                    if($user_arr[7] != 1 and $user_arr[5] != ""){ $my_names[$user_arr[2]] = "<a href=\"mailto:$user_arr[5]\">$user_arr[2]</a>"; }
                                        else{ $my_names[$user_arr[2]] = "$user_arr[2]"; }
                    $name_to_nick[$user_arr[2]] = $user_arr[2];
                }
I think I need to change the eregi to "preg_* where * is something "match"?

Re: error log eregi in Cutenews 1.4.6

Yes, that is right, you need to change

eregi

for

preg_match

, but make sure that 'match' is surrounded by

~*~i

.
For example

eregi("<\?")

is equal to

preg_match("~<\?~i")
Best regards,
CN Support team

Re: error log eregi in Cutenews 1.4.6

Thanks Support!

Re: error log eregi in Cutenews 1.4.6

Thanks for a marvelous posting!

First Call Online