diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/exif/helpers/exif_task.php | 2 | ||||
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 10 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_task.php | 8 | ||||
-rw-r--r-- | modules/gallery/helpers/task.php | 4 | ||||
-rw-r--r-- | modules/organize/controllers/organize.php | 10 | ||||
-rw-r--r-- | modules/tag/controllers/tags.php | 2 |
6 files changed, 18 insertions, 18 deletions
diff --git a/modules/exif/helpers/exif_task.php b/modules/exif/helpers/exif_task.php index 27352643..90869630 100644 --- a/modules/exif/helpers/exif_task.php +++ b/modules/exif/helpers/exif_task.php @@ -82,7 +82,7 @@ class exif_task_Core { $task->done = true; $task->state = "error"; $task->status = $e->getMessage(); - $task->log($e->__toString()); + $task->log((string)$e); } } } diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 6f019aa8..74164305 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -239,7 +239,7 @@ class g2_import_Core { $g2_group = g2(GalleryCoreApi::loadEntitiesById($g2_group_id)); } catch (Exception $e) { return t("Failed to import Gallery 2 group with id: %id\n%exception", - array("id" => $g2_group_id, "exception" => $e->__toString())); + array("id" => $g2_group_id, "exception" => (string)$e)); } switch ($g2_group->getGroupType()) { @@ -295,7 +295,7 @@ class g2_import_Core { $g2_user = g2(GalleryCoreApi::loadEntitiesById($g2_user_id)); } catch (Exception $e) { return t("Failed to import Gallery 2 user with id: %id\n%exception", - array("id" => $g2_user_id, "exception" => $e->__toString())); + array("id" => $g2_user_id, "exception" => (string)$e)); } $g2_groups = g2(GalleryCoreApi::fetchGroupsForUser($g2_user->getId())); @@ -449,7 +449,7 @@ class g2_import_Core { $g2_path = g2($g2_item->fetchPath()); } catch (Exception $e) { return t("Failed to import Gallery 2 item with id: %id\n%exception", - array("id" => $g2_item_id, "exception" => $e->__toString())); + array("id" => $g2_item_id, "exception" => (string)$e)); } $parent = ORM::factory("item")->where("id", "=", self::map($g2_item->getParentId()))->find(); @@ -596,7 +596,7 @@ class g2_import_Core { $g2_comment = g2(GalleryCoreApi::loadEntitiesById($g2_comment_id)); } catch (Exception $e) { return t("Failed to import Gallery 2 comment with id: %id\%exception", - array("id" => $g2_comment_id, "exception" => $e->__toString())); + array("id" => $g2_comment_id, "exception" => (string)$e)); } $text = $g2_comment->getSubject(); @@ -642,7 +642,7 @@ class g2_import_Core { $tag_names = array_values(g2(TagsHelper::getTagsByItemId($g2_item_id))); } catch (Exception $e) { return t("Failed to import Gallery 2 tags for item with id: %id\n%exception", - array("id" => $g2_item_id, "exception" => $e->__toString())); + array("id" => $g2_item_id, "exception" => (string)$e)); } foreach ($tag_names as $tag_name) { diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php index 5402b5d1..c75e050a 100644 --- a/modules/gallery/helpers/gallery_task.php +++ b/modules/gallery/helpers/gallery_task.php @@ -81,7 +81,7 @@ class gallery_task_Core { } catch (Exception $e) { $errors[] = t("Unable to rebuild images for '%title'", array("title" => html::purify($item->title))); - $errors[] = $e->__toString(); + $errors[] = (string)$e; $ignored[$item->id] = 1; } } @@ -114,7 +114,7 @@ class gallery_task_Core { $task->done = true; $task->state = "error"; $task->status = $e->getMessage(); - $errors[] = $e->__toString(); + $errors[] = (string)$e; } if ($errors) { $task->log($errors); @@ -217,7 +217,7 @@ class gallery_task_Core { $task->done = true; $task->state = "error"; $task->status = $e->getMessage(); - $errors[] = $e->__toString(); + $errors[] = (string)$e; } if ($errors) { $task->log($errors); @@ -284,7 +284,7 @@ class gallery_task_Core { $task->done = true; $task->state = "error"; $task->status = $e->getMessage(); - $errors[] = $e->__toString(); + $errors[] = (string)$e; } if ($errors) { $task->log($errors); diff --git a/modules/gallery/helpers/task.php b/modules/gallery/helpers/task.php index ad756ecd..645850d1 100644 --- a/modules/gallery/helpers/task.php +++ b/modules/gallery/helpers/task.php @@ -84,7 +84,7 @@ class task_Core { } $task->save(); } catch (Exception $e) { - Kohana_Log::add("error", $e->__toString()); + Kohana_Log::add("error", (string)$e); // Ugh. I hate to use instanceof, But this beats catching the exception separately since // we mostly want to treat it the same way as all other exceptions @@ -92,7 +92,7 @@ class task_Core { Kohana_Log::add("error", "Validation errors: " . print_r($e->validation->errors(), 1)); } - $task->log($e->__toString()); + $task->log((string)$e); $task->state = "error"; $task->done = true; $task->status = substr($e->getMessage(), 0, 255); diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 201ced30..4a4b9f13 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -36,7 +36,7 @@ class Organize_Controller extends Controller { access::required("edit", $album); print json_encode( - array("grid" => self::_get_micro_thumb_grid($album, $offset)->__toString(), + array("grid" => (string)self::_get_micro_thumb_grid($album, $offset), "sort_column" => $album->sort_column, "sort_order" => $album->sort_order)); } @@ -57,8 +57,8 @@ class Organize_Controller extends Controller { } print json_encode( - array("tree" => self::_expanded_tree(ORM::factory("item", 1), $target_album)->__toString(), - "grid" => self::_get_micro_thumb_grid($target_album, 0)->__toString())); + array("tree" => (string)self::_expanded_tree(ORM::factory("item", 1), $target_album), + "grid" => (string)self::_get_micro_thumb_grid($target_album, 0))); } function rearrange($target_id, $before_or_after) { @@ -114,7 +114,7 @@ class Organize_Controller extends Controller { module::event("album_rearrange", $album); print json_encode( - array("grid" => self::_get_micro_thumb_grid($album, 0)->__toString(), + array("grid" => (string)self::_get_micro_thumb_grid($album, 0), "sort_column" => $album->sort_column, "sort_order" => $album->sort_order)); } @@ -136,7 +136,7 @@ class Organize_Controller extends Controller { $album->save(); print json_encode( - array("grid" => self::_get_micro_thumb_grid($album, 0)->__toString(), + array("grid" => (string)self::_get_micro_thumb_grid($album, 0), "sort_column" => $album->sort_column, "sort_order" => $album->sort_order)); } diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php index e28b7a83..1eede907 100644 --- a/modules/tag/controllers/tags.php +++ b/modules/tag/controllers/tags.php @@ -69,7 +69,7 @@ class Tags_Controller extends Controller { print json_encode( array("result" => "success", - "cloud" => tag::cloud(30)->__toString())); + "cloud" => (string)tag::cloud(30))); } else { print json_encode(array("result" => "error", "form" => (string) $form)); } |