Fixed missing default values
Added default value for $fromTime to prevent missing argument errors and keep backward compatible.
This commit is contained in:
parent
b0bb64c3ee
commit
006799616d
|
@ -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){
|
||||
|
|
|
@ -90,7 +90,7 @@ function human_file_size( $bytes ) {
|
|||
* @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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue