SA-CORE-2025-003 by shin24, anzuukino, mcdruid, nicxvan, ghost of drupal past, longwave
parent
6a38c5a3d8
commit
65fcbbac00
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue