Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Drupal\webform\Controller;
|
||||
|
||||
use Drupal\Component\Utility\Unicode;
|
||||
use Drupal\Core\Ajax\AjaxResponse;
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
use Drupal\Core\Database\Database;
|
||||
|
|
@ -26,7 +25,7 @@ class WebformElementController extends ControllerBase {
|
|||
* The unique id of the message.
|
||||
*
|
||||
* @return \Drupal\Core\Ajax\AjaxResponse
|
||||
* An empty AJAX response.
|
||||
* An empty Ajax response.
|
||||
*
|
||||
* @throws \Exception
|
||||
* Throws exception is storage is not set to 'user' or 'state'.
|
||||
|
|
@ -34,7 +33,7 @@ class WebformElementController extends ControllerBase {
|
|||
* @see \Drupal\webform\Element\WebformMessage::setClosed
|
||||
*/
|
||||
public function close($storage, $id) {
|
||||
if (!in_array($storage, ['user', 'state'])) {
|
||||
if (!in_array($storage, [WebformMessage::STORAGE_USER, WebformMessage::STORAGE_STATE, WebformMessage::STORAGE_CUSTOM])) {
|
||||
throw new \Exception('Undefined storage mechanism for Webform close message.');
|
||||
}
|
||||
WebformMessage::setClosed($storage, $id);
|
||||
|
|
@ -77,7 +76,7 @@ class WebformElementController extends ControllerBase {
|
|||
];
|
||||
|
||||
// Check minimum number of characters.
|
||||
if (Unicode::strlen($q) < (int) $element['#autocomplete_match']) {
|
||||
if (mb_strlen($q) < (int) $element['#autocomplete_match']) {
|
||||
return new JsonResponse([]);
|
||||
}
|
||||
|
||||
|
|
@ -195,7 +194,7 @@ class WebformElementController extends ControllerBase {
|
|||
* Match operator either CONTAINS or STARTS_WITH.
|
||||
*/
|
||||
protected function getMatchesFromOptionsRecursive($q, array $options, array &$matches, $operator = 'CONTAINS') {
|
||||
foreach ($options as $value => $label) {
|
||||
foreach ($options as $label) {
|
||||
if (is_array($label)) {
|
||||
$this->getMatchesFromOptionsRecursive($q, $label, $matches, $operator);
|
||||
continue;
|
||||
|
|
|
|||
Reference in a new issue