Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ticket/12766] Event exporter does not like RCx as version #2650

Merged
merged 1 commit into from Jun 25, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion phpBB/phpbb/event/md_exporter.php
Expand Up @@ -227,7 +227,7 @@ public function validate_event_name($event_name)
*/
public function validate_since($since)
{
if (!preg_match('#^\d+\.\d+\.\d+(?:-(?:a|b|rc|pl)\d+)?$#', $since))
if (!preg_match('#^\d+\.\d+\.\d+(?:-(?:a|b|RC|pl)\d+)?$#', $since))
{
throw new \LogicException("Invalid since information found for event '{$this->current_event}'");
}
Expand Down
2 changes: 1 addition & 1 deletion phpBB/phpbb/event/php_exporter.php
Expand Up @@ -550,7 +550,7 @@ public function find_description()
public function validate_since($line)
{
$match = array();
preg_match('#^\* @since (\d+\.\d+\.\d+(?:-(?:a|b|rc|pl)\d+)?)$#', ltrim($line, "\t"), $match);
preg_match('#^\* @since (\d+\.\d+\.\d+(?:-(?:a|b|RC|pl)\d+)?)$#', ltrim($line, "\t"), $match);
if (!isset($match[1]))
{
throw new \LogicException("Invalid '@since' information for event "
Expand Down
2 changes: 2 additions & 0 deletions tests/event/php_exporter_test.php
Expand Up @@ -118,6 +118,7 @@ static public function validate_since_data()
array('* @since 3.1.0-a1', '3.1.0-a1'),
array('* @since 3.1.0-b3', '3.1.0-b3'),
array(' * @since 3.1.0-b3', '3.1.0-b3'),
array('* @since 3.1.0-RC2', '3.1.0-RC2'),
);
}

Expand All @@ -137,6 +138,7 @@ static public function validate_since_throws_data()
array('* @since 3.1.0-a1 bertie is cool'),
array('bertie* @since 3.1.0-a1'),
array('* @since 3.1-A2'),
array('* @since 3.1.0-rc1'),
);
}

Expand Down