#10460 closed defect (bug) (duplicate)
PemFTP and phpmailer use ereg which is deprecated in PHP 5.3
| Reported by: | lloydbudd | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Warnings/Notices | Version: | 2.9 |
| Severity: | major | Keywords: | |
| Cc: | Focuses: |
Description
ereg is deprecated in PHP 5.3 . Need to be replaced with preg family of functions.
$ ack ereg -l wp-admin/includes/class-ftp-pure.php wp-admin/includes/class-ftp-sockets.php wp-admin/includes/class-ftp.php wp-admin/includes/class-pclzip.php wp-includes/class-phpmailer.php wp-includes/class-pop3.php wp-includes/functions.wp-scripts.php wp-includes/functions.wp-styles.php wp-includes/gettext.php wp-includes/rewrite.php
Change History (12)
#4
@
17 years ago
- Keywords needs-patch added
- Milestone Future Release → 2.9
- Priority low → high
- Severity minor → major
#5
@
17 years ago
- Cc added
- Keywords needs-patch php 5.3, deprecated → needs-patch php 5.3 deprecated
I ran ack-grep myself and found that the WordPress files in the list above do not contain any ereg functions, but phrases that contain the pattern 'ereg' (e.g. $pageregex, wp_deregister_style( $handle )).
The external libraries (class-*.php) do however contain ereg functions.
Has this been fixed, and that is why I am not seeing any ereg functions?
#8
@
17 years ago
- Milestone 2.9 → Future Release
class-pclzip.php uses ereg only if requested and mentions in a comment that it is deprecated.
That leaves the PemFTP files and phpmailer. PemFTP is used by class-wp-filesystem-ftpsockets.php. ftpsockets is used only other fs backends are unavailable. Fixing or replacing PemFTP is not priority.
New versions of phpmailer eliminate the eregi, but those versions require PHP5+. We can look into backporting ereg removal for a future WP release.
#9
@
17 years ago
- Summary ereg is deprecated in PHP 5.3 → PemFTP and phpmailer use ereg which is deprecated in PHP 5.3
Updating summary to make it easier to quickly identify what the issue is.
#10
@
17 years ago
I can take care of phpmailer. I know the class since years and since the main project doesn't upgrade it any longer, we can freely apply changes w/o upstreaming.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Its a shame 60% of those are external libraries.. looks like some upstream patching is needed.