Prechádzať zdrojové kódy

For UUID, Admin::getSubject() test with preg_match fails. Added support for '-' in id.

Maxime HERMOUET 10 rokov pred
rodič
commit
db8bf88329
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      Admin/Admin.php

+ 1 - 1
Admin/Admin.php

@@ -1745,7 +1745,7 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
     {
         if ($this->subject === null && $this->request) {
             $id = $this->request->get($this->getIdParameter());
-            if (!preg_match('#^[0-9A-Fa-f]+$#', $id)) {
+            if (!preg_match('#^[0-9A-Fa-f\-]+$#', $id)) {
                 $this->subject = false;
             } else {
                 $this->subject = $this->getModelManager()->find($this->class, $id);