Bug #14405: strict type control ability
| From: | foobardotcom at poczta dot onet dot pl | Date: | Mon, 10 Dec 2001 15:38:35 +0000 |
| Subject: | Bug #14405: strict type control ability | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-73079@lists.php.net to get a copy of this message | ||
From: foobardotcom@poczta.onet.pl
Operating system: all
PHP version: 4.1.0
PHP Bug Type: Feature/Change Request
Bug description: strict type control ability
Now:
define("E_TYPE", "Invalid type of argument");
function dbexec($connObject, $query) {
if (is_object($connObject)) {
if (get_class($connObject) == "dbconn") {
if (is_string($query)) {
return $connObject->execute($query);
} else {
trigger_error(E_TYPE, E_USER_ERROR);
}
} else {
trigger_error(E_TYPE, E_USER_ERROR);
}
} else {
trigger_error(E_TYPE, E_USER_ERROR);
}
}
I want to be:
function dbexec((dbconn) $connObject, (string) $query) {
return $connObject->execute($query);
}
--
Edit bug report at: http://bugs.php.net/?id=14405&edit=1