Fix error after upgrading to php 7.3.11

After upgrading from php 7 to php 7.3.11 I get 4 error messages related to line 22, 23, 43 and 44:

-> Warning: preg_match() [function.preg-match]: The /e modifier is no longer supported, use preg_replace_callback instead

As described in the error message, you need to rewrite this code using preg_replace_callback and of course $pattern/array line 35 need a fix.

You make this task without access my server.


// Below you will find the code to be corrected:

function filter_wordwrap($str = "", $len = 32, $break = " ")


global $PREFS;

$content = array();

$lines = explode("\n", $str);

foreach ($lines as $line)


$original = $line;

$words = explode(" ", $line);

$line = array();

foreach ($words as $word)


preg_match('#(https?|ftp|news){1}://([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^"\s\(\)<\[]*)?)#ie', $word, $matches1);

preg_match('#([\s\(\)])(www|ftp)\.(([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^"\s\(\)<\[]*)?)#ie', $word, $matches2);

if ( (!$matches1 || !isset($matches1[0]) || !$matches1[0]) && (!$matches2 || !isset($matches2[0]) || !$matches2[0]) )


$line[] = wordwrap($word, $len, $break, 1);




$line[] = $word;



$line = implode(" ", $line);

$pattern = array('#\[url\][^\[<]*?\[/url\]#e',





foreach ( $pattern as $pat )


preg_match($pat, $original, $matches_old);

preg_match($pat, $line, $matches_new);

if ( $matches_old && isset($matches_old[0]) && $matches_new && isset($matches_new[0]) )


$line = str_replace($matches_new[0], $matches_old[0], $line);



$content[] = $line;


$content = implode("\n", $content);

return $content;


Taidot: PHP, tietojärjestelmäarkkitehtuuri, Shell Script

Näytä lisää: mysql error 104 php fix help solution, need fix error php script, code fix error sql injection php, fix error php script, fix error 304 php, php 7.1 11 xdebug, php 7.3 release date, php 7.3 bug, php 7.3 release schedule, php 7.3 changes, php 7.3 hosting, php 7.3 bugs, php 7.3 memcached, php 7.3 features, php 7.3 sqlsrv driver, notice not enabling php 7.3 fpm by default, php 7.3 apache module, php 7.3 nginx, install php 7.3 centos 7

Tietoa työnantajasta:
( 5 arvostelua ) Jyllinge, Denmark

Projektin tunnus: #22282895

Myönnetty käyttäjälle:


hi; i ran into the same issue before; I can fix this within the hour for you. I have been a web developer for more than 10 years.

$20 USD 1 päivässä
(2 Arvostelua)

34 freelanceria on tarjonnut keskimäärin 23$ tähän työhön


Dear Sir, Greetings! -> This looks doable to us. -> We offer an hourly basis of working at the rate of USD7/hour and weekly paying for similar projects. -> We can start on an immediate basis. -> Kindly manage to ge Lisää

$20 USD 3 päivässä
(162 arvostelua)

Hello, I have read your job details carefully and I can do your work if you will provide me more details of the project. I will definitely give you a better solution to your problem. Thanks Ambient Infotech

$20 USD 1 päivässä
(251 arvostelua)

Hello, I believe I can fix this issue as I have 8+ years of experience in PHP as well as in many platforms, so lets chat in freelancer chat box on further discussion, thank

$25 USD 1 päivässä
(220 arvostelua)

I like to do this job. I'll inspect the issue and find the best possible solution for it ASAP without accessing the server, i will change the code you gave me send it to you. I'll give you 2 weeks free support in regar Lisää

$20 USD 1 päivässä
(244 arvostelua)

Hello, My name is Shahid, i am working in web development from past 4 years. Promise to provide quality work and hopefully we will have long term relationship in web development along with maintaining web sites. I want Lisää

$15 USD 1 päivässä
(518 arvostelua)

Hello, ✅If you are searching for a professional website design and development services, you are looking at the right gig. I would love to help you with your needs. ⭐⭐Just waiting for your necessary details to get sta Lisää

$20 USD 7 päivässä
(65 arvostelua)

Hello, let me fix this error. Come to chatbox and let's as you a few questions before I start my work on it. Thanks.

$35 USD 1 päivässä
(116 arvostelua)

Hi, I can help you in project. Please let me know when we can discuss in more details so that we could proceed further. I do work on following skillsets: php, mysql, codeigniter, laravel, wordpress, jquery, google m Lisää

$40 USD 7 päivässä
(142 arvostelua)

Hello, I have gone through your requirement, I can able to fix this error. Let's start right now I am ready to start right away. Please open the chat so we can discuss more in detail and let's crack into it. I am c Lisää

$30 USD 1 päivässä
(103 arvostelua)

Hi i am interested to fix error after upgrading to php, I am expert in php, I have done fixed already similar issue, I can start the job immediately for you. Thank you.

$30 USD 1 päivässä
(158 arvostelua)

Hello. I see you are in need of fixing issue after php upgrade . I can start right away . Let’s discuss

$50 USD 1 päivässä
(16 arvostelua)

Hi, these are PHP deprecated functions(, which will be fixed(for your upgraded php 7x version) in an hour or less, let me know if you are interested, thank you.

$20 USD 1 päivässä
(60 arvostelua)

Hi there, I am an expert at the PHP & surely I can help you out to fix those 4 errors, available to start right now let me know if we can proceed thanks.

$19 USD 1 päivässä
(83 arvostelua)

Hi i have read project description and i am interested to do interesting project please give me chance to work on this project Thanks waiting for your positive response

$20 USD 7 päivässä
(70 arvostelua)

Hello, there. Being familiar with regular expression and PHP, I can fix the issue in a quick time. Hope to be called soon. Thanks.

$30 USD 7 päivässä
(25 arvostelua)

Hi, I have read through your job descriptions, and I understand all of the requirements. I am applying because I believe that I have the required skill set to complete your project. I have been working as a PHP develo Lisää

$30 USD 1 päivässä
(31 arvostelua)

I have also faced the same error more than 2-3times and can fix it easily within 2-3hrs.....................

$10 USD 1 päivässä
(30 arvostelua)

***** PHP Expert***** Hello . I have read your job description carefully. I have full experience in PHP & Javascript & jquery & mysql. If you give me a chance, I will deliver good result. I hope to discuss more via c Lisää

$50 USD 1 päivässä
(3 arvostelua)

⭐Hi, ⭐ I've already solved this issue in my server. if you hire me, I will send result. Please contact me. Thanks

$29 USD 1 päivässä
(14 arvostelua)

I would love to work on your project. I can achieve the results that you are asking for within your budget.

$12 USD 7 päivässä
(6 arvostelua)