Re: gzip functions and error

From: Date: Mon, 24 Jan 2005 19:50:41 +0000
Subject: Re: gzip functions and error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-207150@lists.php.net to get a copy of this message
Dmitry wrote: > Hello! > How disable error messages when i send incorrect data into gzip* "extract" > functions, such as gzinflate or gzuncompress? > > For example: > > function _pack($data) { > $data = serialize($data); > $data = gzdeflate($data,9); > $data = base64_encode($data); > $data = urlencode($data); > return $data; > } # _pack() > > function _unpack($data) { > $data = urldecode($data); > $data = base64_decode($data); > $data = gzinflate($data); > $data = unserialize($data); > return $data; > } # _unpack() > > $s = _pack("123"); // K7YytlIyNDJWsgYA > $s = _unpack("K7YytlIyNDJWsgYA"); // 123 > $s = _unpack("123"); // Warning: gzinflate() [function.gzinflate]: data > error > > How disable this warnings? error_reporting(0) or @ operators does not help > me. error_reporting(0) *SHOULD* do it... And you may want to try putting the @ in front of the whole line: @$s = _unpack("123"); > But I dont want use error_handler functions. Ummmm. Okay. Assuming the error_reporting() and @ really really don't work, you've just rulee out the only solution remaining... -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#207150) next »