1--TEST-- 2Request #12913: PEAR_Error on failure 3--FILE-- 4<?php 5 6/** 7 * Request 12913: "PEAR_Error on failure" 8 * 9 * @category Image 10 * @package Image_GraphViz 11 * @author Philippe Jausions <jausions@php.net> 12 * @link http://pear.php.net/bugs/bug.php?id=12913 13 */ 14require_once 'Image/GraphViz.php'; 15 16$graph = new Image_GraphViz(true, array(), 'G', true, true); 17 18$graph->addNode('Node1', array('label' => 'Node1'), 'cluster_1'); 19 20$result = $graph->image('unavailable_format'); 21if (PEAR::isError($result)) { 22 echo "PEAR_Error\n"; 23} 24 25$graph = new Image_GraphViz(true, array(), 'G', true, false); 26 27$graph->addNode('Node1', array('label' => 'Node1'), 'cluster_1'); 28 29$result = $graph->image('unavailable_format'); 30if ($result === false) { 31 echo "Boolean\n"; 32} 33 34?> 35--EXPECT-- 36PEAR_Error 37Boolean 38