Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ftp-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ jobs:
password: ${{ secrets.FTP_PASSWORD }}
port: ${{ secrets.FTP_PORT }}
local-dir: deploy
# server-dir: ${{ secrets.FTP_REMOTE_DIR }}
server-dir: /
# ${{ secrets.FTP_REMOTE_DIR }}

# - name: Cleanup
# if: always()
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pslam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
php-version: '${{ env.phpVersion }}'
tools: composer:v2

- name: setup config files
run: |
cp ./config/connections-github.php ./config/connections.php
cp library/mailFunctions-sendGrid.php library/mailFunctions.php

- name: Remove composer files
run: rm -f composer.json composer.lock

Expand All @@ -52,6 +57,7 @@ jobs:
with:
sarif_file: results.sarif

# can preview in https://microsoft.github.io/sarif-web-component/
- uses: actions/upload-artifact@v4
with:
name: psalm_results
Expand Down
8 changes: 4 additions & 4 deletions accounts/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
require_once '../model/configuration-model.php';


$directoryURI = $_SERVER['REQUEST_URI'];

Check failure on line 24 in accounts/index.php

View workflow job for this annotation

GitHub Actions / Psalm

UnusedVariable

accounts/index.php:24:1: UnusedVariable: $directoryURI is never referenced or the value is not used (see https://psalm.dev/077)

switch ($action) {
case 'registration':
Expand Down Expand Up @@ -80,7 +80,7 @@
exit;
}
}
break;

Check failure on line 83 in accounts/index.php

View workflow job for this annotation

GitHub Actions / Psalm

UnevaluatedCode

accounts/index.php:83:9: UnevaluatedCode: Expressions after return/throw/continue (see https://psalm.dev/084)
case 'moderate':
include '../view/commentModeration.php';

Expand Down Expand Up @@ -138,7 +138,7 @@

break;
case 'modClient':
$clientId = $_SESSION['clientData']['id'];

Check failure on line 141 in accounts/index.php

View workflow job for this annotation

GitHub Actions / Psalm

UnusedVariable

accounts/index.php:141:9: UnusedVariable: $clientId is never referenced or the value is not used (see https://psalm.dev/077)
include '../view/client-update.php';
break;
case 'updateClient':
Expand Down Expand Up @@ -188,7 +188,7 @@
include '../view/client-update.php';
exit;
}
break;

Check failure on line 191 in accounts/index.php

View workflow job for this annotation

GitHub Actions / Psalm

UnevaluatedCode

accounts/index.php:191:9: UnevaluatedCode: Expressions after return/throw/continue (see https://psalm.dev/084)
case 'testEmail':
if (!IsLoggedInAndHasAccess(2)) {
include '../view/admin.php';
Expand Down Expand Up @@ -338,7 +338,7 @@
break;
case 'addPage':
if (!IsLoggedInAndHasAccess(2)) {
include '../view/managePage.php';
include '../view/managePages.php';
exit();
}
$configInput = [];
Expand All @@ -351,13 +351,13 @@
);
} catch (\Throwable $th) {
if (isset($th->errorInfo)) {
$message = "<p class='notice'>Error. Adding page " . $configInput['name'] . ".<br/>" . json_encode($th->errorInfo) . "</p>";

Check failure on line 354 in accounts/index.php

View workflow job for this annotation

GitHub Actions / Psalm

InvalidArrayOffset

accounts/index.php:354:70: InvalidArrayOffset: Cannot access value on variable $configInput using offset value of 'name', expecting 'slug' or 'lockedComments' (see https://psalm.dev/115)
$_SESSION['message'] = $message;
} else {
$message = "<p class='notice'>Error. Adding page " . $configInput['name'] . ".</p>";

Check failure on line 357 in accounts/index.php

View workflow job for this annotation

GitHub Actions / Psalm

InvalidArrayOffset

accounts/index.php:357:70: InvalidArrayOffset: Cannot access value on variable $configInput using offset value of 'name', expecting 'slug' or 'lockedComments' (see https://psalm.dev/115)
$_SESSION['message'] = $message;
}
include '../view/managePage.php';
include '../view/managePages.php';
exit();
}

Expand Down Expand Up @@ -422,7 +422,7 @@
$clientId = $_SESSION['clientData']['id'];
if (empty($checkPassword)) {
$_SESSION['message'] = '<p class="error">Please provide information for all empty form fields.</p>';
include '../client-update.php';
include '../view/client-update.php';
exit;
}

Expand All @@ -439,11 +439,11 @@
header('location: /accounts/');
exit;
} else {
$message = "<p class='notice'>Error. Password was not updated.</p>";

Check failure on line 442 in accounts/index.php

View workflow job for this annotation

GitHub Actions / Psalm

UnusedVariable

accounts/index.php:442:13: UnusedVariable: $message is never referenced or the value is not used (see https://psalm.dev/077)
include '../client-update.php';
include '../view/client-update.php';
exit;
}
break;

Check failure on line 446 in accounts/index.php

View workflow job for this annotation

GitHub Actions / Psalm

UnevaluatedCode

accounts/index.php:446:9: UnevaluatedCode: Expressions after return/throw/continue (see https://psalm.dev/084)
default:
include '../view/admin.php';
// include '../view/404.php';
Expand Down
8 changes: 7 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
findUnusedCode="true"
>
<projectFiles>
<directory name="./" />
<!-- <directory name="./" /> -->
<file name="index.php" />
<file name="accounts/index.php" />
<file name="comments/index.php" />
<file name="conversations/index.php" />
<file name="form/index.php" />
<file name="users/index.php" />
<ignoreFiles>

</ignoreFiles>
Expand Down
Loading