Page MenuHomePhorge

D25142.1734848524.diff
No OneTemporary

D25142.1734848524.diff

diff --git a/externals/pear-figlet/Text/Figlet.php b/externals/pear-figlet/Text/Figlet.php
--- a/externals/pear-figlet/Text/Figlet.php
+++ b/externals/pear-figlet/Text/Figlet.php
@@ -140,20 +140,17 @@
if (!$compressed) {
/* ZIPed font */
if (fread($fp, 2) == 'PK') {
- if (!function_exists('zip_open')) {
- return self::raiseError('Cannot load ZIP compressed fonts since'
- . ' ZIP PHP extension is not available.',
- 5);
- }
-
fclose($fp);
- if (!($fp = zip_open($filename))) {
- return self::raiseError('Cannot open figlet font file ' . $filename, 2);
+ $zip = new ZipArchive();
+ $open_result = $zip->open($filename, ZipArchive::RDONLY);
+ if ($open_result !== true) {
+ return self::raiseError('Cannot open figlet font file ' .
+ $filename . ', got error: ' . $open_result, 2);
}
- $name = zip_entry_name(zip_read($fp));
- zip_close($fp);
+ $name = $zip->getNameIndex(0);
+ $zip->close();
if (!($fp = fopen('zip://' . realpath($filename) . '#' . $name, 'rb'))) {
return self::raiseError('Cannot open figlet font file ' . $filename, 2);
@@ -231,7 +228,7 @@
$i = hexdec(substr($i, 2));
} else {
// If octal
- if ($i{0} === '0' && $i !== '0' || substr($i, 0, 2) == '-0') {
+ if ($i[0] === '0' && $i !== '0' || substr($i, 0, 2) == '-0') {
$i = octdec($i);
}
}
@@ -274,7 +271,7 @@
$lt = hexdec(substr($str, $i+2, 4));
$i += 5;
} else {
- $lt = ord($str{$i});
+ $lt = ord($str[$i]);
}
$hb = preg_quote($this->hardblank, '/');

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 06:22 (18 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1025432
Default Alt Text
D25142.1734848524.diff (2 KB)

Event Timeline