Draft for bug-report-text addressing getclass()-problems

From: Date: Tue, 17 Feb 2004 15:11:43 +0000
Subject: Draft for bug-report-text addressing getclass()-problems
Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-570@lists.php.net to get a copy of this message
Please find enclosed a draft for the text I intend to file as bug against affected packages. If there are no strong objections from your side I'll file the bugs this evening (in about 6 to 8 hours). Hope that's fine with you all ... Regards, Stefan ----- ## from the PEAR QA team ## ## quality-assurance related ## Please note that if you don't react to this issue within 4 weeks the PEAR QA-team will take care of it automatically. This is not "rude" but necessary for QA. If this is a "false positive" and your package is not affected please apologize. This package uses getclass()-calls without care for case-sensitivity of the returned classnames. In PHP 4.x the default for getclass() was that lowercase classnames were returned. However, due to extended DOM functionality, PHP 5.x returns classnames with correct upper-and-lowercase. If you intend to run your package under both PHP4 and PHP5 please consider using case-independent comparisons or apply case-fixes. Reproduceable code: Affected are constructs like: if (get_class($a) == 'db') { ... } Solutions: if (strcasecmp($a, 'db') == 0) { ... } or if (strtolower($a) == 'db') { ... }

« previous php.pear.qa (#570) next »