#16920 closed defect (bug) (fixed)
PHP5-Port: Take out unnecessary compat functions from diverse files
Reported by: | hakre | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.2 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Attachments (9)
Change History (28)
#1
@
14 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
What is this? You literally copied #16918?
#5
@
14 years ago
[17535] - some php version compare in class-http, see 16920.patch, 16920.2.patch
-- done per that commit.
#13
@
14 years ago
- Cc dd32 added
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
I have found two PHP4 compat codes:
- get_gmt_from_date() - wp-includes/formatting.php
- _unzip_file_ziparchive() - wp-admin/includes/file.php (dd32?)
#14
@
14 years ago
_unzip_file_ziparchive() - wp-admin/includes/file.php (dd32?)
Not a compat function
_unzip_file_ziparchive() & _unzip_file_pclzip() are 2 different methods to extract zip files, The first is used when the PHP Zip extension is loaded (Which is not always the case) the 2nd is used in all other cases as it uses pure-PHP code to do the extraction. They're both "private workers" for unzip_file();
#15
follow-up:
↓ 16
@
14 years ago
Ignore that.. Turns out there was some PHP4 comapt in there: (thanks ocean90)
- $zopen = $z->open($file, /* ZIPARCHIVE::CHECKCONS */ 4); + $zopen = $z->open($file, ZIPARCHIVE::CHECKCONS);
#16
in reply to:
↑ 15
@
14 years ago
- Keywords reporter-feedback has-patch added; needs-patch removed
Replying to dd32:
Ignore that.. Turns out there was some PHP4 comapt in there: (thanks ocean90)
- $zopen = $z->open($file, /* ZIPARCHIVE::CHECKCONS */ 4); + $zopen = $z->open($file, ZIPARCHIVE::CHECKCONS);
php ZIPARCHIVE constants are not automatically available, so not using the CONST does make still sense with PHP 5.2+.
I think this ticket should be still reopend because of technosailor's findings. Patch looks good to me.
class-http.php