Added default value for $fromTime to prevent missing argument errors and
keep backward compatible.
* @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){
* @param $timestamp unix timestamp
* @returns human readable interpretation of the timestamp
*/
-function relative_modified_date($timestamp, $fromTime, $dateOnly = false) {
+function relative_modified_date($timestamp, $fromTime = null, $dateOnly = false) {
return(\relative_modified_date($timestamp, $fromTime, $dateOnly));
}