#33432 closed defect (bug) (fixed)
PemFTP uses the ereg extension, which PHP7 removed
Reported by: | dd32 | Owned by: | dd32 |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Filesystem API | Keywords: | |
Focuses: | Cc: |
Description
We include PemFTP which is a pure-php implementation of FTP for usage when the PHP FTP Extension is unavailable.
We should convert PemFTP from using the ereg set of functions, to using PCRE (preg_*), for both PHP7 compatibility and to remove the PHP Deprecated notices in PHP 5.3+.
It looks like the work done in the below GitHub repo is what's needed:
https://github.com/yama/PemFTP
I believe the PemFTP library is unmaintained upstream, and we already have a number of customisations.
Attachments (2)
Change History (8)
#1
@
9 years ago
The attached patch is based upon the changes made in the linked repo. Tests seem to pass with it but I couldn't find the specific tests to run on their own.
#2
@
9 years ago
Looks like glob_regexp()
probably needs a preg_quote()
, some of the others may need it too if they've got data passed in.
As for tests, AFAIK there exist no tests for this section of code (either by us, or others), and due to the complexity of adding them, it's not going to be realistic to add them either.
#3
@
9 years ago
33432.2.diff has the preg_quote
added.
I couldn't see anywhere else in the 3 changed files that has regex data passed in to a preg_
function so for now it's just that one added.
#4
@
9 years ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed
In 34281:
ereg to preg