From 1a007fc8e7bf71fc5e292929af00a15bcac6b2c2 Mon Sep 17 00:00:00 2001 From: Rafael Bodill Date: Fri, 19 Sep 2014 17:00:19 +0300 Subject: Fix timestamp adjusting for a list of arrays --- application/controllers/user.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/controllers/user.php b/application/controllers/user.php index 30e5b9fd7..a9e50d742 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -148,10 +148,14 @@ class User extends MY_Controller { ->get()->result_array(); // Convert timestamp to unix timestamp - if (isset($query['created'])) + foreach ($query as & $record) { - $query['created'] = strtotime($query['created']); + if ( ! empty($record['created'])) + { + $record['created'] = strtotime($record['created']); + } } + unset($record); if (static_storage("response_type") == "json") { return send_json_reply($query); -- cgit v1.2.3-24-g4f1b