Skip to content

Commit 586cab3

Browse files
committed
more psalm fixes
1 parent fc2070f commit 586cab3

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

include/UserAdmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public function check_access(string $homedir, int $uid, int $gid) : string
306306
$fuid = fileowner($homedir);
307307
$fgid = filegroup($homedir);
308308
$fperms = fileperms($homedir);
309-
$fperm = substr(sprintf("%o", $fperms), 2);
309+
$fperm = substr(sprintf("%o", (string) $fperms), 2);
310310
$rights["owner"] = substr($fperm, 0, 1);
311311
$rights["group"] = substr($fperm, 1, 1);
312312
$rights["world"] = substr($fperm, 2, 1);

psalm.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717

1818
<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->
1919

20-
<DeprecatedMethod errorLevel="info" />
21-
<DeprecatedProperty errorLevel="info" />
22-
<DeprecatedClass errorLevel="info" />
23-
<DeprecatedConstant errorLevel="info" />
24-
<DeprecatedInterface errorLevel="info" />
25-
<DeprecatedTrait errorLevel="info" />
2620

2721
<InternalMethod errorLevel="info" />
2822
<InternalProperty errorLevel="info" />
@@ -37,7 +31,6 @@
3731
<RedundantCondition errorLevel="info" />
3832
<RedundantConditionGivenDocblockType errorLevel="info" />
3933

40-
4134
<DocblockTypeContradiction errorLevel="info" />
4235
<TypeDoesNotContainType errorLevel="info" />
4336

public/index.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@
5555
$flash->info("User emailed");
5656
$with_password = $values;
5757
$with_password['password'] = $_POST['password'];
58-
$model->sendPostCreationEmail($with_password);
58+
$success = $model->sendPostCreationEmail($with_password);
59+
if(!$success) {
60+
$flash->error("Email may not have been sent.");
61+
}
5962
}
6063
$form = new PureFTPAdmin\Form\User();
6164
}

0 commit comments

Comments
 (0)