From 94f410840cf51792e23828d473cce46a2fb39f4f Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 17 Mar 2010 16:59:41 -0600 Subject: [PATCH] Remove Horde_Core and PEAR dependencies from Horde_Util --- framework/Util/lib/Horde/String.php | 12 ++++++------ framework/Util/lib/Horde/Util.php | 1 - framework/Util/package.xml | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/framework/Util/lib/Horde/String.php b/framework/Util/lib/Horde/String.php index 409b72616..60ad2bfd0 100644 --- a/framework/Util/lib/Horde/String.php +++ b/framework/Util/lib/Horde/String.php @@ -99,14 +99,14 @@ class Horde_String } if (is_object($input)) { - // PEAR_Error objects are almost guaranteed to contain recursion, - // which will cause a segfault in PHP. We should never reach - // this line, but add a check and a log message to help the devs - // track down and fix this issue. - if (is_a($input, 'PEAR_Error')) { - Horde::logMessage('Called convertCharset() on a PEAR_Error object. ' . print_r($input, true), 'DEBUG'); + // PEAR_Error/Exception objects are almost guaranteed to contain + // recursion, which will cause a segfault in PHP. We should never + // reach this line, but add a check. + if (($input instanceof Exception) || + ($input instanceof PEAR_Error)) { return ''; } + $input = Horde_Util::cloneObject($input); $vars = get_object_vars($input); while (list($key, $val) = each($vars)) { diff --git a/framework/Util/lib/Horde/Util.php b/framework/Util/lib/Horde/Util.php index 589c2ade6..6ed6848f4 100644 --- a/framework/Util/lib/Horde/Util.php +++ b/framework/Util/lib/Horde/Util.php @@ -91,7 +91,6 @@ class Horde_Util } $caller .= ' on line ' . $bt[0]['line'] . ' of ' . $bt[0]['file']; - Horde::logMessage('Horde_Util::cloneObject called on variable of type ' . gettype($obj) . ' by ' . $caller, 'DEBUG'); $ret = $obj; return $ret; diff --git a/framework/Util/package.xml b/framework/Util/package.xml index a7aefb8f7..b4baf04cb 100644 --- a/framework/Util/package.xml +++ b/framework/Util/package.xml @@ -77,12 +77,12 @@ http://pear.php.net/dtd/package-2.0.xsd"> 1.5.4 - - - PEAR - pear.php.net + Url + pear.horde.org + + iconv -- 2.11.0