Put regex rules between single quotes
This commit is contained in:
parent
d52c6184b9
commit
f05c228f1d
7 changed files with 16 additions and 16 deletions
|
@ -483,7 +483,7 @@ class CcFiles extends BaseCcFiles
|
|||
private static function stripTimeStampFromYearTag($metadata)
|
||||
{
|
||||
if (isset($metadata['year'])) {
|
||||
if (preg_match("/^(\d{4})-(\d{2})-(\d{2})(?:\s+(\d{2}):(\d{2}):(\d{2}))?$/", $metadata['year'])) {
|
||||
if (preg_match('/^(\d{4})-(\d{2})-(\d{2})(?:\s+(\d{2}):(\d{2}):(\d{2}))?$/', $metadata['year'])) {
|
||||
$metadata['year'] = substr($metadata['year'], 0, 4);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue