SA-CORE-2025-003 by shin24, anzuukino, mcdruid, nicxvan, ghost of drupal past, longwave

merge-requests/11262/head
Dave Long 2025-02-18 22:40:30 +00:00
parent 6a38c5a3d8
commit 65fcbbac00
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
2 changed files with 4 additions and 13 deletions

View File

@ -20,18 +20,6 @@ final class ProceduralCall {
}
/**
* Calls a function in the root namespace.
*
* __call() does not support references https://bugs.php.net/bug.php?id=71256
* Because of this, ModuleHandler::getHookListeners() inlines this
* method so it is not called anywhere in core.
*/
public function __call($name, $args): mixed {
$this->loadFile($name);
return ('\\' . $name)(... $args);
}
/**
* Loads the file a function lives in, if any.
*

View File

@ -5,6 +5,7 @@ namespace Drupal\views;
use Drupal\Component\Plugin\Exception\PluginException;
use Drupal\Component\Plugin\PluginManagerInterface;
use Drupal\Core\Plugin\DefaultLazyPluginCollection;
use Drupal\views\Plugin\views\display\DisplayPluginInterface;
/**
* A class which wraps the displays of a view so you can lazy-initialize them.
@ -59,7 +60,9 @@ class DisplayPluginCollection extends DefaultLazyPluginCollection {
*/
public function clear() {
foreach (array_filter($this->pluginInstances) as $display) {
$display->destroy();
if ($display instanceof DisplayPluginInterface) {
$display->destroy();
}
}
parent::clear();