diff options
author | Rafael Bodill <rafi@sortex.co.il> | 2014-09-19 16:00:19 +0200 |
---|---|---|
committer | Rafael Bodill <rafi@sortex.co.il> | 2014-09-19 16:00:19 +0200 |
commit | 1a007fc8e7bf71fc5e292929af00a15bcac6b2c2 (patch) | |
tree | e1e24258539a1dab8e84b6ee10619b1ab8512daa | |
parent | 701f6b08f7d983e364b3b97d7525d3e94f5b19d0 (diff) |
Fix timestamp adjusting for a list of arrays
-rw-r--r-- | application/controllers/user.php | 8 |
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); |