summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Http/RequestHandlers/GedcomLoad.php2
-rw-r--r--phpstan-baseline.neon38
2 files changed, 15 insertions, 25 deletions
diff --git a/app/Http/RequestHandlers/GedcomLoad.php b/app/Http/RequestHandlers/GedcomLoad.php
index c8a07a51d3..d61f7effc1 100644
--- a/app/Http/RequestHandlers/GedcomLoad.php
+++ b/app/Http/RequestHandlers/GedcomLoad.php
@@ -139,7 +139,7 @@ class GedcomLoad implements RequestHandlerInterface
}
// What character set is this? Need to convert it to UTF8
- if (preg_match('/[\r\n][ \t]*1 CHAR(?:ACTER)? (.+)/', $data->chunk_data, $match)) {
+ if (preg_match('/[\r\n][ \t]*1 CHAR(?:ACTER)? ([^\r\n]+)/', $data->chunk_data, $match)) {
$charset = strtoupper(trim($match[1]));
} else {
$charset = 'ASCII';
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index 5da72ce646..0020c32c8e 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -12,7 +12,7 @@ parameters:
-
message: "#^Parameter \\#1 \\$line of method Fisharebest\\\\Webtrees\\\\CommonMark\\\\CensusTableParser\\:\\:parseRow\\(\\) expects string, string\\|null given\\.$#"
- count: 2
+ count: 1
path: app/CommonMark/CensusTableParser.php
-
@@ -160,7 +160,7 @@ parameters:
path: app/Functions/FunctionsRtl.php
-
- message: "#^Parameter \\#1 \\$str of function substr expects string, array\\|string given\\.$#"
+ message: "#^Parameter \\#1 \\$string of function substr expects string, array\\|string given\\.$#"
count: 4
path: app/Functions/FunctionsRtl.php
@@ -240,7 +240,7 @@ parameters:
path: app/GedcomTag.php
-
- message: "#^Parameter \\#1 \\$decimal_number of function dechex expects int, float\\|int given\\.$#"
+ message: "#^Parameter \\#1 \\$num of function dechex expects int, float\\|int given\\.$#"
count: 1
path: app/GedcomTag.php
@@ -325,7 +325,7 @@ parameters:
path: app/Http/Controllers/Admin/ImportThumbnailsController.php
-
- message: "#^Cannot access offset 0 on array\\<int, string\\>\\|false\\.$#"
+ message: "#^Cannot access offset 0 on \\(array\\<int, string\\>&nonEmpty\\)\\|false\\.$#"
count: 2
path: app/Http/Controllers/Admin/ImportThumbnailsController.php
@@ -675,7 +675,7 @@ parameters:
path: app/Http/RequestHandlers/SetupWizard.php
-
- message: "#^Parameter \\#1 \\$str of function substr expects string, string\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#"
count: 1
path: app/Http/RequestHandlers/SetupWizard.php
@@ -740,7 +740,7 @@ parameters:
path: app/Individual.php
-
- message: "#^Parameter \\#1 \\$str of function substr expects string, string\\|null given\\.$#"
+ message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|null given\\.$#"
count: 2
path: app/Individual.php
@@ -982,7 +982,7 @@ parameters:
-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
- path: modules_v4/example-footer.disable/module.php
+ path: modules_v4/example.disable/module.php
-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
@@ -992,37 +992,37 @@ parameters:
-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
- path: modules_v4/example-theme.disable/module.php
+ path: modules_v4/ghezibde-history.disable/module.php
-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
- path: modules_v4/ghezibde-history.disable/module.php
+ path: modules_v4/example-theme.disable/module.php
-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
- path: modules_v4/example-report.disable/module.php
+ path: modules_v4/ghezibde-forum.disable/module.php
-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
- path: modules_v4/example.disable/module.php
+ path: modules_v4/ghezibde.disable/module.php
-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
- path: modules_v4/ghezibde.disable/module.php
+ path: modules_v4/example-report.disable/module.php
-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
- path: modules_v4/ghezibde-gallery.disable/module.php
+ path: modules_v4/example-footer.disable/module.php
-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
- path: modules_v4/ghezibde-forum.disable/module.php
+ path: modules_v4/ghezibde-gallery.disable/module.php
-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
@@ -1575,16 +1575,6 @@ parameters:
path: app/Report/ReportParserGenerate.php
-
- message: "#^Parameter \\#1 \\$haystack of function str_starts_with expects string, string\\|null given\\.$#"
- count: 1
- path: app/Report/ReportParserGenerate.php
-
- -
- message: "#^Parameter \\#1 \\$xref of method Fisharebest\\\\Webtrees\\\\Contracts\\\\IndividualFactoryInterface\\:\\:make\\(\\) expects string, string\\|null given\\.$#"
- count: 1
- path: app/Report/ReportParserGenerate.php
-
- -
message: "#^Cannot call method childFamilies\\(\\) on Fisharebest\\\\Webtrees\\\\Individual\\|null\\.$#"
count: 1
path: app/Report/ReportParserGenerate.php