mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
handle case when there are multiple sdk methods
This commit is contained in:
parent
3128a7b837
commit
e10f1eb10f
1 changed files with 5 additions and 4 deletions
|
|
@ -1039,10 +1039,11 @@ App::init()
|
|||
* Deprecation Warning
|
||||
*/
|
||||
$sdk = $route->getLabel('sdk', false);
|
||||
if (!empty($sdk)) {
|
||||
/** @var \Appwrite\SDK\Method $sdk */
|
||||
if ($sdk->isDeprecated()) {
|
||||
$warnings[] = 'This route is deprecated. See the updated documentation for improved compatibility and migration details.';
|
||||
$deprecationWarning = 'This route is deprecated. See the updated documentation for improved compatibility and migration details.';
|
||||
$sdkItems = is_array($sdk) ? $sdk : (!empty($sdk) ? [$sdk] : []);
|
||||
foreach ($sdkItems as $sdkItem) {
|
||||
if ($sdkItem->isDeprecated()) {
|
||||
$warnings[] = $deprecationWarning;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue