note 109960 added to function.gzuncompress
| From: | PapaPingouin | Date: | Thu, 06 Sep 2012 07:50:20 +0000 |
| Subject: | note 109960 added to function.gzuncompress | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-190525@lists.php.net to get a copy of this message | ||
gzuncompress make un error if the string is not a gzcompress string.
You can test the header string before gzuncompress
FR : gzumcompress génère une erreur si la chaine n'est pas au bon format.
Vous pouvez tester le header de la chaine avant d'appeller gzuncompress
header :
0x78 0x01 (level 1)
0x78 0x5e (level 2,3,4,5)
0x78 0x9c (level 6)
0x78 0xda (level 7,8,9)
<?php
if( ord($string[0]) == 0x78 && in_array(ord($string[1]),array(0x01,0x5e,0x9c,0xda)) )
$uncompressedstring = gzuncompress( $string );
?>
----
Server IP: 69.147.83.197
Probable Submitter: 109.22.49.236
----
Manual Page -- http://www.php.net/manual/en/function.gzuncompress.php
Edit -- https://master.php.net/note/edit/109960
Del: integrated -- https://master.php.net/note/delete/109960/integrated
Del: useless -- https://master.php.net/note/delete/109960/useless
Del: bad code -- https://master.php.net/note/delete/109960/bad+code
Del: spam -- https://master.php.net/note/delete/109960/spam
Del: non-english -- https://master.php.net/note/delete/109960/non-english
Del: in docs -- https://master.php.net/note/delete/109960/in+docs
Del: other reasons-- https://master.php.net/note/delete/109960
Reject -- https://master.php.net/note/reject/109960
Search -- https://master.php.net/manage/user-notes.php