$longFilename = null;
}
if ($header['typeflag'] == 'L') {
- if (version_compare(PHP_VERSION, '5.5.0-dev', '>=')) {
- $format = 'Z'.$header['size'].'filename';
- }
- else {
- $format = 'a'.$header['size'].'filename';
- }
+ $format = 'Z'.$header['size'].'filename';
$fileData = unpack($format, $this->file->read(512));
$longFilename = $fileData['filename'];
}
// extract values
- if (version_compare(PHP_VERSION, '5.5.0-dev', '>=')) {
- $format = 'Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/Z8checksum/Z1typeflag/Z100link/Z6magic/Z2version/Z32uname/Z32gname/Z8devmajor/Z8devminor/Z155prefix';
- }
- else {
- $format = 'a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155prefix';
- }
+ $format = 'Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/Z8checksum/Z1typeflag/Z100link/Z6magic/Z2version/Z32uname/Z32gname/Z8devmajor/Z8devminor/Z155prefix';
$data = unpack($format, $binaryData);
$this->header .= 'Content-Type: '.$this->getContentType().'; charset=UTF-8'.self::$lineEnding;
}
- // until PHP 5.3.4 mb_send_mail() appends an extra MIME-Version header
- // @see: https://bugs.php.net/bug.php?id=52681
- if (MAIL_SEND_METHOD != 'php' || version_compare(PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION, '5.3.4', '>=')) {
- $this->header .= 'MIME-Version: 1.0'.self::$lineEnding;
- }
+ $this->header .= 'MIME-Version: 1.0'.self::$lineEnding;
return $this->header;
}
/**
* Generates secure random numbers using OpenSSL.
*
- * This method forces mt_rand() if PHP versions below 5.4.0 are used due to a bug
- * causing up to 15 seconds delay until the bytes are returned.
- *
* @see http://de1.php.net/manual/en/function.openssl-random-pseudo-bytes.php#104322
* @param integer $min
* @param integer $max
}
// fallback to mt_rand() if OpenSSL is not available
- if (version_compare(PHP_VERSION, '5.4.0-dev', '<') || !function_exists('openssl_random_pseudo_bytes')) {
+ if (!function_exists('openssl_random_pseudo_bytes')) {
return mt_rand($min, $max);
}