Skip to content

Commit

Permalink
Bug-fix.
Browse files Browse the repository at this point in the history
Changelog excerpt:
- The cache handler failed to unserialise multiline data when fetching
  cache entries due to a missing regex flag; Fixed.
  • Loading branch information
Maikuolan committed Sep 20, 2024
1 parent 7b87f9c commit 510e38c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ found at:

=== Changes made since last versioned release ===

(none)
- [2024.09.20; Bug-fix; Maikuolan]: The cache handler failed to unserialise
multiline data when fetching cache entries due to a missing regex flag;
Fixed.

=== Version/Release 2.12.2 ===
PATCH RELEASE.
Expand Down
4 changes: 2 additions & 2 deletions src/Cache.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* A simple, unified cache handler (last modified: 2024.05.30).
* A simple, unified cache handler (last modified: 2024.09.20).
*
* This file is a part of the "common classes package", utilised by a number of
* packages and projects, including CIDRAM and phpMussel.
Expand Down Expand Up @@ -1077,7 +1077,7 @@ public function clearExpiredPDO(): bool
*/
public function unserializeEntry($Entry)
{
if (!is_string($Entry) || !preg_match('~^a:\d+:\{.*\}$~', $Entry)) {
if (!is_string($Entry) || !preg_match('~^a:\d+:\{.*\}$~s', $Entry)) {
return $Entry;
}
$Arr = unserialize($Entry);
Expand Down
4 changes: 2 additions & 2 deletions src/CommonAbstract.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Common abstract for the common classes package (last modified: 2024.08.08).
* Common abstract for the common classes package (last modified: 2024.09.20).
*
* This file is a part of the "common classes package", utilised by a number of
* packages and projects, including CIDRAM and phpMussel.
Expand All @@ -20,7 +20,7 @@ abstract class CommonAbstract
* @var string Common Classes Package tag/release version.
* @link https://github.com/Maikuolan/Common/tags
*/
public const VERSION = '2.12.2';
public const VERSION = '2.12.3';

/**
* Traverse data path.
Expand Down

0 comments on commit 510e38c

Please sign in to comment.