Skip to content

Commit

Permalink
Cast the SafeString $task->status to (string) so that it doesn't come
Browse files Browse the repository at this point in the history
down to the JS as an object.
  • Loading branch information
bharat committed Jan 29, 2010
1 parent e7cfbfe commit 3ed8186
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/gallery/controllers/admin_maintenance.php
Expand Up @@ -215,15 +215,15 @@ public function run($task_id) {
print json_encode(array("result" => "success",
"task" => array(
"percent_complete" => $task->percent_complete,
"status" => $task->status,
"status" => (string) $task->status,
"done" => (bool) $task->done),
"location" => url::site("admin/maintenance")));

} else {
print json_encode(array("result" => "in_progress",
"task" => array(
"percent_complete" => $task->percent_complete,
"status" => $task->status,
"status" => (string) $task->status,
"done" => (bool) $task->done)));
}
}
Expand Down

0 comments on commit 3ed8186

Please sign in to comment.