Mercurial > hg > mgallery
changeset 334:0ea16a3777b8
Improve error messages.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 19 Jun 2023 12:44:18 +0300 |
parents | 9dece4d00e30 |
children | c9147be13386 |
files | mgtool.php |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mgtool.php Mon Jun 19 12:44:04 2023 +0300 +++ b/mgtool.php Mon Jun 19 12:44:18 2023 +0300 @@ -341,14 +341,14 @@ { // Skip other chunks if (fseek($fh, $chunk["size"], SEEK_CUR) < 0) - return "File seek error in chunk skip"; + return "File seek error in chunk data skip"; } // If the chunk size is not aligned, skip one byte if ($chunk["size"] & 1) { if (fseek($fh, 1, SEEK_CUR) < 0) - return "File seek error in chunk skip"; + return "File seek error in chunk alignment skip"; } } @@ -653,6 +653,7 @@ $captions[$m[2]] = ["caption" => $m[3]]; else $hasData = preg_match("/^([#%]?)\s*(\S+?)$/", $str, $m); + if ($hasData) { $captions[$m[2]] = [