cvs: pear /SOAP Base.php

From: Date: Thu, 25 Jan 2007 22:58:53 +0000
Subject: cvs: pear /SOAP Base.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44381@lists.php.net to get a copy of this message
yunosh Thu Jan 25 22:58:53 2007 UTC Modified files: /pear/SOAP Base.php Log: Remove _isBase64() alltogether because it's unreliable. http://cvs.php.net/viewvc.cgi/pear/SOAP/Base.php?r1=1.71&r2=1.72&diff_format=u Index: pear/SOAP/Base.php diff -u pear/SOAP/Base.php:1.71 pear/SOAP/Base.php:1.72 --- pear/SOAP/Base.php:1.71 Tue Jan 23 17:29:08 2007 +++ pear/SOAP/Base.php Thu Jan 25 22:58:53 2007 @@ -737,13 +737,9 @@ if (SOAP_Type_hexBinary::is_hexbin($value)) { $type = 'hexBinary'; } else { - if ($this->_isBase64($value)) { - $type = 'base64Binary'; - } else { - $dt =& new SOAP_Type_dateTime($value); - if ($dt->toUnixtime() != -1) { - $type = 'dateTime'; - } + $dt =& new SOAP_Type_dateTime($value); + if ($dt->toUnixtime() != -1) { + $type = 'dateTime'; } } } @@ -786,21 +782,6 @@ } /** - * Returns whether a string is base64 encoded data. - * - * @param string $value The string to check. - * - * @return boolean True if the specified value seems to be base64 encoded. - */ - function _isBase64($value) - { - $l = strlen($value); - return $l && - !preg_match('|[^A-Za-z=/+]|', $value) && - base64_decode($value) !== false; - } - - /** * Returns whether a type is a base64 type. * * @param string $type A type name.

« previous php.pear.cvs (#44381) next »