8000 Update src/Symfony/Component/DomCrawler/Crawler.php · symfony/symfony@88eef5f · GitHub
[go: up one dir, main page]

Skip to content

Commit 88eef5f

Browse files
Update src/Symfony/Component/DomCrawler/Crawler.php
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
1 parent e1bb777 commit 88eef5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,9 @@ public function children(string $selector = null): static
526526
*
527527
* @throws \InvalidArgumentException When current node is empty
528528
*/
529-
public function attr(string $attribute, string $default = null): ?string
529+
public function attr(string $attribute/* , string $default = null */): ?string
530530
{
531+
$default = \func_num_args() > 1 ? func_get_arg(1) : null;
531532
if (!$this->nodes) {
532533
if (null !== $default) {
533534
return $default;

0 commit comments

Comments
 (0)
0