PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Web Services » Services_YouTube » Bug #9117

Services_YouTube_Exception::getFaultString() does not exist.

Details

Submitted2006-10-21 01:24 UTC
Fromjudas dot iscariote at gmail dot com
Assignedshin
StatusClosed
PackageServices_YouTube
PHP Version5.2.0 RC4
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2006-10-21 01:24 UTC] judas dot iscariote at gmail dot com

Description:
------------
Hi:

On line 381 of YouTube.php method useXMLRPC() you find the following code.

} catch (Exception $e) {
throw new Services_YouTube_Exception($e->getFaultString());
}

however when this code is reached, a fatal error is thrown 'cause there is no getFaultString() method defined in Services_YouTube_Exception

Test script:
---------------
<?php
require_once 'Services/YouTube.php';

$dev_id = "Yourid";
$user_id = "anyguy";
$youtube = new Services_YouTube($dev_id, array('usesCache' => true));
$youtube->setDriver('xmlrpc');
$user = $youtube->getProfile($user_id);
?>

Expected result:
----------------
Services_YouTube_Exception: dl()Unable to load dynamic library.. xmlrpc.so.........

Actual result:
--------------
Fatal error: Call to undefined method Services_YouTube_Exception::getFaultString() in /usr/share/pear/Services/YouTube.php on line 381

I guess getFaultString() should be replaced by getMessage() right ?