summaryrefslogtreecommitdiffstats
path: root/lib/private/template
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-10-03 14:21:18 +0200
committerVincent Petry <pvince81@owncloud.com>2013-10-03 14:21:41 +0200
commit006799616d584fc3f83e325910368a8af0aee072 (patch)
treec031c1b6fbdcbe77371782e819803aeefef8846d /lib/private/template
parentb0bb64c3eebce41a35cfe6674f63f454d22f200c (diff)
downloadnextcloud-server-006799616d584fc3f83e325910368a8af0aee072.tar.gz
nextcloud-server-006799616d584fc3f83e325910368a8af0aee072.zip
Fixed missing default values
Added default value for $fromTime to prevent missing argument errors and keep backward compatible.
Diffstat (limited to 'lib/private/template')
-rw-r--r--lib/private/template/functions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php
index 858134dd8c6..0aa2b27b96b 100644
--- a/lib/private/template/functions.php
+++ b/lib/private/template/functions.php
@@ -104,9 +104,9 @@ function strip_time($timestamp){
* @param bool $dateOnly whether to strip time information
* @return formatted timestamp
*/
-function relative_modified_date($timestamp, $fromTime, $dateOnly = false) {
+function relative_modified_date($timestamp, $fromTime = null, $dateOnly = false) {
$l=OC_L10N::get('lib');
- if (!isset($fromTime)){
+ if (!isset($fromTime) || $fromTime === null){
$fromTime = time();
}
if ($dateOnly){