-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix in src/pfcurlprocessing.php for PHP7 compatibility #39
Comments
attempted this change and still getting blank messages :-( Currently just removed the pfc_make_hyperlink call from the get message command and things all work except the auto hyperlinking. |
I solved it like this (for PHP 7):
|
@webprogrammierer Which file do I have to put this code into? |
@Torsten-K I have made this changes in the file src/pfcurlprocessing.php |
@webprogrammierer Danke schön / thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(sorry for not submitting a pull request, can't get it done - don't know what I'm doing wrong :-( )
pfcurlprocessing.php in PHP7 (Ubuntu 16.04) causes empty message content displayed
issue is caused by deprecated /e modifier in preg_replace. Fix is to go for preg_replace_callback
The 3 preg_replace statements must thus read :
$ret = preg_replace_callback("#(^|[\n ]])([\w]+?://[\w#$ %()&~/!.-;:=,?@+]*)#is", function($m) { return "$m[1]<a href="$m[2]"" . $target . ">" . pfc_shorten_url($m[2]) . "";}, $ret);
$ret = preg_replace_callback("#(^|[\n ]])([a-z0-9&-_.]+?)@([\w-]+.([\w-.]+.)*[\w]+)#i", function($m) { return "$m[1]<a href="mailto:$m[2]@$m[3]">" . pfc_shorten_url($m[2].'@'.$m[3]) . "";}, $ret);
The text was updated successfully, but these errors were encountered: