Re: Invalid class constructors
| From: | Stefan Walk | Date: | Mon, 16 Feb 2004 12:49:08 +0000 |
| Subject: | Re: Invalid class constructors | ||
| References: | 1 2 3 4 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-543@lists.php.net to get a copy of this message | ||
On Mon, Feb 16, 2004 at 10:23:48AM +0100, Lukas Smith wrote:
> could you do similar magic in regards to get_class without strtolower calls?
$ grep -nri get_class * | grep -vi strtolower |grep !=\\\|== |wc -l
114
Not all of them are affected, i sorted a few out... here's the rest:
Archive_Zip/Zip.php:573: && (get_class($p_archive) ==
'archive_zip')) {
Archive_Zip/Zip.php:626: && (get_class($p_archive_to_add) ==
'archive_zip')) {
Config/Config/Container.php:127: if (get_class($target) != 'config_container') {
Config/Config.php:161: if (is_object($rootContainer) && get_class($rootContainer) ==
'config_container') {
DBA/DBA.php:124: (get_class($value) == 'dba_error' || is_subclass_of($value,
'dba_error')));
DBA_Relational/TempTable.php:45: (get_class($tTable) == 'dba_temptable' ||
DB_DataObject/DataObject.php:2659: if ( get_class($obj) == 'db_dataobject') {
DB_DataObject/DataObject.php:2970: if ($method == get_class($this)) {
Date/Date.php:125: ((get_class($date) == 'date') ||
HTML_QuickForm/QuickForm.php:1721: return (is_object($value) && (get_class($value) ==
'html_quickform_error' || is_subclass_of($value, 'html_quickform_error')));
HTML_QuickForm/QuickForm/select.php:360: if (!is_object($result) || (get_class($result) !=
"db_result" &&
HTML_QuickForm/QuickForm/select.php:447: case (get_class($options) ==
"db_result" || is_subclass_of($options, "db_result")):
HTML_Select/Select.php:214: if (!is_object($result) || (get_class($result) !=
"db_result" &&
HTML_Select/Select.php:287: case (get_class($options) == "db_result" ||
is_subclass_of($options, "db_result")):
HTML_Template_Flexy/Flexy/Compiler/Standard/Tag.php:608: if (get_class($element) !=
'html_template_flexy_token_tag') {
HTML_Template_Flexy/Flexy/Token.php:278: if (get_class($res[$i]) ==
'html_template_flexy_token_text') {
Log_Parser/Parser.php:95: if (is_object($config) and (get_class($config) ==
'log_parser_config'))
MDB/MDB.php:402: && (get_class($value) == 'mdb_error'
Mail_Queue/Queue/Container/db.php:236: if (!is_object($mail) || get_class($mail) !=
'mail_queue_body') {
Mail_Queue/Queue/Container/db.php:268: if (!is_object($mail) || get_class($mail) !=
'mail_queue_body') {
Mail_Queue/Queue/Container/mdb.php:334: if (!is_object($mail) || get_class($mail) !=
'mail_queue_body') {
Mail_Queue/Queue/Container/mdb.php:364: if (!is_object($mail) || get_class($mail) !=
'mail_queue_body') {
Mail_Queue/Queue.php:424: (get_class($value) == 'mail_queue_error' ||
Math/Fraction.php:211: if (get_class($fraction) != 'math_fraction') {
Math_Complex/ComplexOp.php:49: return (get_class($c1) == 'math_complex'
Math_Integer/IntegerOp.php:46: return get_class($int) != 'math_integer_common'
Math_Matrix/Matrix.php:1319: return is_object($matrix) && (get_class($matrix) ==
"math_matrix");
Math_Quaternion/QuaternionOp.php:115: return (get_class($q1) ==
'math_quaternion'
Math_Vector/CompactedTuple.php:32: } elseif (is_object($arg) && get_class($arg)
== "math_tuple") {
Math_Vector/Vector.php:72: } elseif (is_object($data) && get_class($data) ==
"math_tuple") {
Math_Vector/Vector.php:74: } else if (is_object($data) && get_class($data) ==
"math_vector") {
Math_Vector/Vector.php:108: get_class($this->_tuple) ==
"math_tuple");
Math_Vector/Vector2.php:45: elseif ( is_object($arg) && (get_class($arg) !=
"math_vector2"
Math_Vector/Vector2.php:46: && get_class($arg) !=
"math_tuple") )
Math_Vector/Vector2.php:48: elseif ( is_object($arg) && get_class($arg) ==
"math_tuple"
Math_Vector/Vector3.php:45: elseif ( is_object($arg) && (get_class($arg) !=
"math_vector3"
Math_Vector/Vector3.php:46: && get_class($arg) !=
"math_tuple") )
Math_Vector/Vector3.php:48: elseif ( is_object($arg) && get_class($arg) ==
"math_tuple"
Math_Vector/VectorOp.php:46: return (is_object($obj) && (get_class($obj)
== "math_vector" ||
Math_Vector/VectorOp.php:62: return (is_object($obj) && (get_class($obj)
== "math_vector2" ||
Math_Vector/VectorOp.php:78: return (is_object($obj) && (get_class($obj)
== "math_vector3" ||
Net_DNS/DNS/Resolver.php:1041: if (is_object($packetORname) &&
get_class($packetORname) == 'net_dns_packet') {
Net_IPv4/IPv4.php:326: if (! is_object($network) || get_class($network) !=
'net_ipv4') {
Net_IPv4/IPv4.php:329: if (! is_object($network) || get_class($network) !=
'net_ipv4') {
Net_LDAP/LDAP/Util.php:56: if (is_object($ldap) && (get_class($ldap) ==
'net_ldap')) {
Net_LDAP/LDAP.php:281: if (is_object($dn) && get_class($dn) ==
'net_ldap_entry') {
Net_SmartIRC/SmartIRC.php:2464: return (bool)(is_object($object) &&
(get_class($object) == 'net_smartirc_error'));
Net_UserAgent/Detect.php:206: if (!isset($this) || get_class($this) !=
'net_useragent_detect') {
* Exactly the same for lines
454,478,519,548,566,588,611,633,672,702,725,747,769,791,813,841,878,911,937
* I hope you have an editor that is capable of search&replace ;)
Net_UserAgent_Mobile/Mobile.php:178: && (get_class($value) ==
'net_useragent_mobile_error'
* Does this belong to PEAR?
PECL/soap/interop/client_round2_interop.php:253: if (get_class($h) ==
'soap_header') {
PECL/soap/interop/client_round2_interop.php:583: if (get_class($header) ==
'soap_header') {
PECL/soap/interop/client_round2_params.php:57: (get_class($v[0]) == 'soapvar'
|| get_class($v[0]) == 'soapparam'))
PECL/soap/interop/client_round2_params.php:89: if (get_class($h) ==
'soap_header') {
* Don't know if it's supposed to be here
PHPUnit_TestDox/TestDox/ResultPrinter.php:120: if ($this->testClass != get_class($test)) {
*** This won't work in php4
Payment_Verisign/Verisign.php:517: substr (get_class ($var), -9) == 'Exception');
Perm_LiveUser/LiveUser.php:1401: (get_class($value) == 'liveuser_error' ||
is_subclass_of($value, 'liveuser_error')));
SOAP_Interop/interop_Round2Base.php:96: if (get_class($inputStruct)=='soapstruct')
SOAP_Interop/interop_client.php:174: if (get_class($h) == 'soap_header') {
SOAP_Interop/interop_client.php:379: if (get_class($header) !=
'soap_header') {
SOAP_Interop/interop_client.php:403: if (gettype($sent)=='object' &&
(get_class($sent)=='soap_value' ||
SOAP_Interop/interop_client.php:528: if (get_class($header) ==
'soap_header') {
SOAP_Interop/interop_test.php:55: if (gettype($v[0]) == 'object' &&
get_class($v[0]) == 'soap_value')
SOAP_Interop/interop_test.php:94: if (get_class($h) == 'soap_header') {
SOAP_Interop/server_Round3GroupDDocLit.php:48: if (is_object($inputStruct) &&
get_class($inputStruct)=='soapstruct')
SOAP_Interop/server_Round3GroupDDocLitParams.php:46: if (is_object($inputStruct) &&
get_class($inputStruct)=='soapstruct')
SOAP_Interop/server_Round3GroupDImport2.php:30: if (is_object($inputStruct) &&
get_class($inputStruct)=='soapstruct')
SOAP_Interop/server_Round3GroupDImport3.php:31: if (is_object($inputStruct) &&
get_class($inputStruct)=='soapstruct')
SOAP_Interop/server_Round3GroupDRpcEnc.php:47: if (is_object($inputStruct) &&
get_class($inputStruct)=='soapstruct')
*** Again php4
Science_Chemistry/Chemistry/Element.php:120: (get_class($obj) ==
"Science_Chemistry_Element" ||
Services_Weather/Weather/Common.php:184: if (is_object($cache) && (get_class($cache)
== "cache" || is_subclass_of($cache, "cache"))) {
Services_Weather/Weather/Metar.php:756: } elseif (get_class($result) !=
"db_result" || $result->numRows() == 0) {
Services_Weather/Weather/Metar.php:834: } elseif (get_class($result) != "db_result"
|| $result->numRows() == 0) {
Services_Weather/Weather/Metar.php:882: } elseif (get_class($result) != "db_result"
|| $result->numRows() == 0) {
Services_Weather/Weather/Metar.php:981: } elseif (get_class($result) !=
"db_result" || $result->numRows() == 0) {
Services_Weather/Weather.php:193: return (is_object($value) && (get_class($value) ==
"pear_error" || is_subclass_of($value, "pear_error")));
System_Command/Command.php:497: (get_class($in_value) ==
'system_command_error' ||
Tree/Tree.php:169: (get_class($value) == 'tree_error' ||
XML_Annotea/RAP/util/adodb/adodb-pear.inc.php:200: (get_class($value)
== 'db_error' ||
XML_Annotea/RAP/util/adodb/adodb-pear.inc.php:217: (get_class( $value ) ==
"db_warning" ||
*** php4 again
XML_CSSML/CSSML/libxslt.php:100: if ($in_type == 'object' &&
get_class($in_CSSML) == 'DomDocument') {
XML_CSSML/CSSML/libxslt.php:116: if (get_class($this->CSSMLDoc) !=
'DomDocument') {
XML_Tree/Tree.php:378: if(!is_object($this->root) || (get_class($this->root) !=
'xml_tree_node'))
XML_XSLT_Wrapper/XSLT_Wrapper.php:184: (get_class($value) == 'xlst_error'
||
XML_sql2xml/sql2xml.php:268: if (get_class($resultset) == "db_result") {
And no, I'm not going to open 100 Bug reports ;)
Stefan
--
Regards,
Stefan Walk
<swalk@prp.physik.tu-darmstadt.de>