Use a more useful error handling.
authorJan Schneider <jan@horde.org>
Wed, 3 Feb 2010 18:45:30 +0000 (19:45 +0100)
committerJan Schneider <jan@horde.org>
Mon, 8 Feb 2010 09:16:25 +0000 (10:16 +0100)
kronolith/scripts/upgrades/convert_to_utc.php

index 099c0a5..ddd276e 100755 (executable)
@@ -9,7 +9,7 @@ require_once dirname(__FILE__) . '/../../lib/Application.php';
 Horde_Registry::appInit('kronolith', array('authentication' => 'none', 'cli' => true));
 
 /* Prepare DB stuff. */
-PEAR::staticPushErrorHandling(PEAR_ERROR_DIE);
+PEAR::pushErrorHandling(PEAR_ERROR_CALLBACK, create_function('$e', 'echo $e->toString()."\n";exit;'));
 $db = DB::connect($conf['sql']);
 $result = $db->query('SELECT event_title, event_id, event_creator_id, event_start, event_end, event_allday, event_recurenddate FROM ' . $conf['calendar']['params']['table'] . ' ORDER BY event_creator_id');
 $stmt = $db->prepare('UPDATE kronolith_events SET event_start = ?, event_end = ?, event_recurenddate = ? WHERE event_id = ?');