Lengkap

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);

}

else

{

$line[] = $word;

}

}

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

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

'#\[url=[^\[<]*?\].*?\[/url\]#e',

'#\[email\][^\[<]*?\[/email\]#',

'#\[email=[^\[<]*?\].*?\[/email\]#',

);

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;

}

Kemahiran: PHP, Kejuruteraan Perisian, Skrip Kekerang

Lihat lagi: 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

Tentang Majikan:
( 5 ulasan ) Jyllinge, Denmark

ID Projek: #22282895

Dianugerahkan kepada:

omsolutions4

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 dalam sehari
(2 Ulasan)
1.1

34 pekerja bebas membida secara purata $23 untuk pekerjaan ini

vw580939vw

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 Lagi

$20 USD dalam 3 hari
(162 Ulasan)
7.4
ambientinfotech

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 dalam sehari
(251 Ulasan)
7.1
khyatiraval

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 dalam sehari
(220 Ulasan)
7.0
FarazAbbas

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 Lagi

$20 USD dalam sehari
(244 Ulasan)
7.0
shahid864

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 Lagi

$15 USD dalam sehari
(518 Ulasan)
7.0
gaurav

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 Lagi

$20 USD dalam 7 hari
(65 Ulasan)
7.0
Creativeartbd

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 dalam sehari
(116 Ulasan)
6.6
royalwebraisers

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 Lagi

$40 USD dalam 7 hari
(142 Ulasan)
6.6
cubecreation

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 Lagi

$30 USD dalam sehari
(103 Ulasan)
6.6
wsafreelancer

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 dalam sehari
(158 Ulasan)
6.4
Hikesoftwares

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

$50 USD dalam sehari
(16 Ulasan)
5.5
bharathreddy11

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 dalam sehari
(60 Ulasan)
5.5
joshiprakash

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 dalam sehari
(83 Ulasan)
5.5
amjadali4888

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 dalam 7 hari
(70 Ulasan)
5.2
logos106

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 dalam 7 hari
(25 Ulasan)
5.3
aswebsmart

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 Lagi

$30 USD dalam sehari
(31 Ulasan)
4.7
satyaguts

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

$10 USD dalam sehari
(30 Ulasan)
4.5
Alexsfodik

***** 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 Lagi

$50 USD dalam sehari
(3 Ulasan)
4.1
alexand1025

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

$29 USD dalam sehari
(14 Ulasan)
3.9
weareriders

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

$12 USD dalam 7 hari
(6 Ulasan)
3.5