1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-03 14:17:56 +02:00

[ticket/15687] Adjust regex for attachment URL

PHPBB3-15687
This commit is contained in:
Marc Alexander 2023-06-27 22:34:44 +02:00
parent b02ad26015
commit 5cb0b267d3
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -86,7 +86,7 @@ class phpbb_functional_acp_attachments_test extends phpbb_functional_test_case
// Get attach id, the link looks similar to ./download/attachment/3
$attach_link = $crawler->filter('span.file-name > a')->attr('href');
$matches = [];
preg_match('/\/([0-9]+)$/', $attach_link, $matches);
preg_match('/\/([0-9]+)\/valid\.jpg$/', $attach_link, $matches);
$attach_id = (int) $matches[1];
// Set file time older than 3 hours to consider it orphan