Browse Source

Merge pull request #49237 from nextcloud/fix/noid/deprecation-correct-case

pull/49243/head
Kate 1 year ago
committed by GitHub
parent
commit
a489d88a2b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      lib/private/AppFramework/Middleware/Security/CORSMiddleware.php

2
lib/private/AppFramework/Middleware/Security/CORSMiddleware.php

@ -102,12 +102,12 @@ class CORSMiddleware extends Middleware {
*/
protected function hasAnnotationOrAttribute(ReflectionMethod $reflectionMethod, string $annotationName, string $attributeClass): bool {
if ($this->reflector->hasAnnotation($annotationName)) {
$this->logger->debug($reflectionMethod->getDeclaringClass()->getName() . '::' . $reflectionMethod->getName() . ' uses the @' . $annotationName . ' annotation and should use the #[' . $attributeClass . '] attribute instead');
return true;
}
if (!empty($reflectionMethod->getAttributes($attributeClass))) {
$this->logger->debug($reflectionMethod->getDeclaringClass()->getName() . '::' . $reflectionMethod->getName() . ' uses the @' . $annotationName . ' annotation and should use the #[' . $attributeClass . '] attribute instead');
return true;
}

Loading…
Cancel
Save