diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-07-19 16:01:05 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-01 08:20:15 +0200 |
commit | 28098a7602e429044b3128f4db4ae92f3edbb6fd (patch) | |
tree | 596004ef30b2c97ecafa47845a27a05e494885c9 /lib | |
parent | 80b649c471247296d4034dfd891a9e9f3abf1c06 (diff) | |
download | nextcloud-server-28098a7602e429044b3128f4db4ae92f3edbb6fd.tar.gz nextcloud-server-28098a7602e429044b3128f4db4ae92f3edbb6fd.zip |
Fix \OCP\Util
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/helper.php | 2 | ||||
-rw-r--r-- | lib/public/Util.php | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php index 6775fe99dcd..6704a8cd318 100644 --- a/lib/private/legacy/helper.php +++ b/lib/private/legacy/helper.php @@ -395,7 +395,7 @@ class OC_Helper { * performs a search in a nested array * @param array $haystack the array to be searched * @param string $needle the search string - * @param string $index optional, only search this key name + * @param mixed $index optional, only search this key name * @return mixed the key of the matching field, otherwise false * * performs a search in a nested array diff --git a/lib/public/Util.php b/lib/public/Util.php index 6f2e455c3e4..e4ebdb5bfa7 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -252,6 +252,7 @@ class Util { * * @deprecated 8.0.0 Use \OC::$server->query('DateTimeFormatter') instead * @since 4.0.0 + * @suppress PhanDeprecatedFunction */ public static function formatDate($timestamp, $dateOnly=false, $timeZone = null) { return \OC_Util::formatDate($timestamp, $dateOnly, $timeZone); @@ -351,7 +352,7 @@ class Util { * @since 5.0.0 */ public static function getServerHostName() { - $host_name = self::getServerHost(); + $host_name = \OC::$server->getRequest()->getServerHost(); // strip away port number (if existing) $colon_pos = strpos($host_name, ':'); if ($colon_pos != FALSE) { @@ -447,7 +448,7 @@ class Util { /** * Make a computer file size (2 kB to 2048) * @param string $str file size in a fancy format - * @return int a file size in bytes + * @return float a file size in bytes * * Inspired by: http://www.php.net/manual/en/function.filesize.php#92418 * @since 4.0.0 @@ -602,7 +603,7 @@ class Util { * * @param array $haystack the array to be searched * @param string $needle the search string - * @param int $index optional, only search this key name + * @param mixed $index optional, only search this key name * @return mixed the key of the matching field, otherwise false * @since 4.5.0 */ @@ -648,6 +649,7 @@ class Util { * @return bool true if the file name is valid, false otherwise * @deprecated 8.1.0 use \OC\Files\View::verifyPath() * @since 7.0.0 + * @suppress PhanDeprecatedFunction */ public static function isValidFileName($file) { return \OC_Util::isValidFileName($file); |