DateArgumentWrapper uses method_exists(getFormat) but calls getArgFormat(), preventing custom handlers from validating arguments
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3544743. --> Reported by: [ramil g](https://www.drupal.org/user/133684) Related to !69 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>DateArgumentWrapper::getArgFormat() currently checks</p> <pre>if (method_exists($class, 'getFormat')) {<br>&nbsp; return $this-&gt;dateArg-&gt;getArgFormat();<br>}</pre><p> This is inconsistent: it checks for getFormat() but then calls getArgFormat().</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Replace</p> <pre>method_exists($class, 'getFormat')</pre><p> with</p> <pre>method_exists($this-&gt;dateArg, 'getArgFormat')</pre><p> This ensures the wrapper properly detects and uses getArgFormat() implementations in custom argument handlers.</p>
issue