mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-04-29 09:49:06 -04:00
Convert __toString() to use (string) cast instead.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user