summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Bodill <rafi@sortex.co.il>2014-09-19 16:00:19 +0200
committerRafael Bodill <rafi@sortex.co.il>2014-09-19 16:00:19 +0200
commit1a007fc8e7bf71fc5e292929af00a15bcac6b2c2 (patch)
treee1e24258539a1dab8e84b6ee10619b1ab8512daa
parent701f6b08f7d983e364b3b97d7525d3e94f5b19d0 (diff)
Fix timestamp adjusting for a list of arrays
-rw-r--r--application/controllers/user.php8
1 files 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);