mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #50452 from nextcloud/chore/update-stub
chore: update php intl stub and fix type issues
This commit is contained in:
commit
fed74d78ca
4 changed files with 2293 additions and 1921 deletions
|
|
@ -168,7 +168,7 @@ class Notify extends StorageAuthBase {
|
|||
}
|
||||
|
||||
private function getStorageIds(int $mountId, string $path): array {
|
||||
$pathHash = md5(trim((string)\OC_Util::normalizeUnicode($path), '/'));
|
||||
$pathHash = md5(trim(\OC_Util::normalizeUnicode($path), '/'));
|
||||
$qb = $this->connection->getQueryBuilder();
|
||||
return $qb
|
||||
->select('storage_id', 'user_id')
|
||||
|
|
@ -181,7 +181,7 @@ class Notify extends StorageAuthBase {
|
|||
}
|
||||
|
||||
private function updateParent(array $storageIds, string $parent): int {
|
||||
$pathHash = md5(trim((string)\OC_Util::normalizeUnicode($parent), '/'));
|
||||
$pathHash = md5(trim(\OC_Util::normalizeUnicode($parent), '/'));
|
||||
$qb = $this->connection->getQueryBuilder();
|
||||
return $qb
|
||||
->update('filecache')
|
||||
|
|
|
|||
|
|
@ -1744,9 +1744,6 @@
|
|||
<InvalidNullableReturnType>
|
||||
<code><![CDATA[array]]></code>
|
||||
</InvalidNullableReturnType>
|
||||
<InvalidScalarArgument>
|
||||
<code><![CDATA[\OC_Util::normalizeUnicode($path)]]></code>
|
||||
</InvalidScalarArgument>
|
||||
<NullableReturnStatement>
|
||||
<code><![CDATA[null]]></code>
|
||||
<code><![CDATA[null]]></code>
|
||||
|
|
@ -1999,11 +1996,6 @@
|
|||
</NoInterfaceProperties>
|
||||
</file>
|
||||
<file src="lib/private/Files/Storage/Wrapper/Encoding.php">
|
||||
<InvalidArgument>
|
||||
<code><![CDATA[\Normalizer::FORM_C]]></code>
|
||||
<code><![CDATA[\Normalizer::FORM_C]]></code>
|
||||
<code><![CDATA[\Normalizer::FORM_D]]></code>
|
||||
</InvalidArgument>
|
||||
<UndefinedInterfaceMethod>
|
||||
<code><![CDATA[$this->namesCache]]></code>
|
||||
<code><![CDATA[$this->namesCache]]></code>
|
||||
|
|
|
|||
4196
build/stubs/intl.php
4196
build/stubs/intl.php
File diff suppressed because it is too large
Load diff
|
|
@ -940,15 +940,15 @@ class OC_Util {
|
|||
* Normalize a unicode string
|
||||
*
|
||||
* @param string $value a not normalized string
|
||||
* @return bool|string
|
||||
* @return string The normalized string or the input if the normalization failed
|
||||
*/
|
||||
public static function normalizeUnicode($value) {
|
||||
public static function normalizeUnicode(string $value): string {
|
||||
if (Normalizer::isNormalized($value)) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
$normalizedValue = Normalizer::normalize($value);
|
||||
if ($normalizedValue === null || $normalizedValue === false) {
|
||||
if ($normalizedValue === false) {
|
||||
\OCP\Server::get(LoggerInterface::class)->warning('normalizing failed for "' . $value . '"', ['app' => 'core']);
|
||||
return $value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue