don't use PEAR::isError, use instanceof instead.