diff --git a/src/ChurchCRM/Reports/PDF_Directory.php b/src/ChurchCRM/Reports/PDF_Directory.php index 0bea112d93..2d69eb4138 100644 --- a/src/ChurchCRM/Reports/PDF_Directory.php +++ b/src/ChurchCRM/Reports/PDF_Directory.php @@ -287,7 +287,7 @@ public function sGetCustomString($rsCustomFields, $aRow): string } } - public function getBirthdayString(bool $bDirBirthday, $per_BirthMonth, $per_BirthDay, $per_BirthYear, $per_Flags): string + public function getBirthdayString(bool $bDirBirthday, $per_BirthMonth, $per_BirthDay, $per_BirthYear, ?bool $per_Flags): string { if ($bDirBirthday && $per_BirthDay > 0 && $per_BirthMonth > 0) { return MiscUtils::formatBirthDate($per_BirthYear, $per_BirthMonth, $per_BirthDay, $per_Flags); diff --git a/src/ChurchCRM/SQLUtils.php b/src/ChurchCRM/SQLUtils.php index 36dfeb3209..42693dde9b 100644 --- a/src/ChurchCRM/SQLUtils.php +++ b/src/ChurchCRM/SQLUtils.php @@ -93,7 +93,7 @@ private static function clearSQL($sql, &$isMultiComment) while (preg_match('{--\s|#|/\*[^!]}sUi', $sql, $matched, PREG_OFFSET_CAPTURE, $offset)) { [$comment, $foundOn] = $matched[0]; if (self::isQuoted($foundOn, $sql)) { - $offset = (int) $foundOn + strlen($comment); + $offset = $foundOn + strlen($comment); } else { if (mb_substr($comment, 0, 2) == '/*') { $closedOn = strpos($sql, '*/', $foundOn); diff --git a/src/ChurchCRM/dto/Photo.php b/src/ChurchCRM/dto/Photo.php index 03ef4059b9..0180df9f66 100644 --- a/src/ChurchCRM/dto/Photo.php +++ b/src/ChurchCRM/dto/Photo.php @@ -14,8 +14,8 @@ class Photo private $photoURI; private ?string $photoThumbURI = null; private ?string $thumbnailPath = null; - private $photoContentType; - private $thumbnailContentType; + private $photoContentType = null; + private $thumbnailContentType = null; private bool $remotesEnabled; public static $validExtensions = ['png', 'jpeg', 'jpg']; @@ -208,12 +208,12 @@ public function getThumbnailBytes(): string return $content; } - public function getPhotoBytes() + public function getPhotoBytes(): string { $content = file_get_contents($this->photoURI); MiscUtils::throwIfFailed($content); - return $content; + return (string) $content; } public function getPhotoContentType() diff --git a/src/ChurchCRM/model/ChurchCRM/Person.php b/src/ChurchCRM/model/ChurchCRM/Person.php index aec7d7f2c8..723d8d7e98 100644 --- a/src/ChurchCRM/model/ChurchCRM/Person.php +++ b/src/ChurchCRM/model/ChurchCRM/Person.php @@ -44,7 +44,7 @@ public function isFemale(): bool return $this->getGender() == 2; } - public function getGenderName() + public function getGenderName(): string { switch (strtolower($this->getGender())) { case 1: diff --git a/src/ChurchCRM/utils/RedirectUtils.php b/src/ChurchCRM/utils/RedirectUtils.php index c6c6d8098c..2144940236 100644 --- a/src/ChurchCRM/utils/RedirectUtils.php +++ b/src/ChurchCRM/utils/RedirectUtils.php @@ -9,8 +9,6 @@ class RedirectUtils /** * Convert a relative URL into an absolute URL and redirect the browser there. * - * @param string $sRelativeURL - * * @throws \Exception */ public static function redirect(string $sRelativeURL): void diff --git a/src/Include/alphaAPI.js b/src/Include/alphaAPI.js deleted file mode 100644 index 2e02698dde..0000000000 --- a/src/Include/alphaAPI.js +++ /dev/null @@ -1,216 +0,0 @@ -/** - * alphaAPI - * Original Author: chrisken - * Original Url: http://www.cs.utexas.edu/users/chrisken/alphaapi.html - * - * Modified by dallen - */ -function alphaAPI( - element, - fadeInDelay, - fadeOutDelay, - startAlpha, - stopAlpha, - offsetTime, - deltaAlpha, -) { - // {{{ properties - - this.element = - typeof element == "object" ? element : document.getElementById(element); - this.fadeInDelay = fadeInDelay || 40; - this.fadeOutDelay = fadeOutDelay || this.fadeInDelay; - this.startAlpha = startAlpha; - this.stopAlpha = stopAlpha; - // make sure a filter exists so an error is not thrown - if (typeof this.element.filters == "object") { - if (typeof this.element.filters.alpha == "undefined") { - this.element.style.filter += "alpha(opacity=100)"; - } - } - - this.offsetTime = (offsetTime || 0) * 1000; - this.deltaAlpha = deltaAlpha || 10; - this.timer = null; - this.paused = false; - this.started = false; - this.cycle = false; - this.command = function () {}; - - // }}} - // {{{ repeat() - - this.repeat = function (repeat) { - this.cycle = repeat ? true : false; - }; - - // }}} - // {{{ setAlphaBy() - - this.setAlphaBy = function (deltaAlpha) { - this.setAlpha(this.getAlpha() + deltaAlpha); - }; - - // }}} - // {{{ toggle() - - this.toggle = function () { - if (!this.started) { - this.start(); - } else if (this.paused) { - this.unpause(); - } else { - this.pause(); - } - }; - - // }}} - // {{{ timeout() - - this.timeout = function (command, delay) { - this.command = command; - this.timer = setTimeout(command, delay); - }; - - // }}} - // {{{ setAlpha() - - this.setAlpha = function (opacity) { - if (typeof this.element.filters == "object") { - this.element.filters.alpha.opacity = opacity; - } else if (this.element.style.setProperty) { - this.element.style.setProperty("-moz-opacity", opacity / 100, ""); - } - }; - - // }}} - // {{{ getAlpha() - - this.getAlpha = function () { - if (typeof this.element.filters == "object") { - return this.element.filters.alpha.opacity; - } else if (this.element.style.getPropertyValue) { - return this.element.style.getPropertyValue("-moz-opacity") * 100; - } - - return 100; - }; - - // }}} - // {{{ start() - - this.start = function () { - this.started = true; - this.setAlpha(this.startAlpha); - // determine direction - if (this.startAlpha > this.stopAlpha) { - var instance = this; - this.timeout(function () { - instance.fadeOut(); - }, this.offsetTime); - } else { - var instance = this; - this.timeout(function () { - instance.fadeIn(); - }, this.offsetTime); - } - }; - - // }}} - // {{{ stop() - - this.stop = function () { - this.started = false; - this.setAlpha(this.stopAlpha); - this.stopTimer(); - this.command = function () {}; - }; - - // }}} - // {{{ reset() - - this.reset = function () { - this.started = false; - this.setAlpha(this.startAlpha); - this.stopTimer(); - this.command = function () {}; - }; - - // }}} - // {{{ pause() - - this.pause = function () { - this.paused = true; - this.stopTimer(); - }; - - // }}} - // {{{ unpause() - - this.unpause = function () { - this.paused = false; - if (!this.started) { - this.start(); - } else { - this.command(); - } - }; - - // }}} - // {{{ stopTimer() - - this.stopTimer = function () { - clearTimeout(this.timer); - this.timer = null; - }; - - // }}} - // {{{ fadeOut() - - this.fadeOut = function () { - this.stopTimer(); - if (this.getAlpha() > this.stopAlpha) { - this.setAlphaBy(-1 * this.deltaAlpha); - var instance = this; - this.timeout(function () { - instance.fadeOut(); - }, this.fadeOutDelay); - } else { - if (this.cycle) { - var instance = this; - this.timeout(function () { - instance.fadeIn(); - }, this.fadeInDelay); - } else { - this.started = false; - } - } - }; - - // }}} - // {{{ fadeIn() - - this.fadeIn = function () { - this.stopTimer(); - if (this.getAlpha() < this.startAlpha) { - this.setAlphaBy(this.deltaAlpha); - var instance = this; - this.timeout(function () { - instance.fadeIn(); - }, this.fadeInDelay); - } else { - if (this.cycle) { - var instance = this; - this.timeout(function () { - instance.fadeOut(); - }, this.fadeOutDelay); - } else { - this.started = false; - } - } - }; - - return this; - - // }}} -} diff --git a/src/PeopleDashboard.php b/src/PeopleDashboard.php index c5cfc04453..1ff7aadadd 100644 --- a/src/PeopleDashboard.php +++ b/src/PeopleDashboard.php @@ -285,9 +285,9 @@ getDateDeactivated()) ? 'true' : 'false'); //update only if the value is different - if ($currentStatus != $newStatus) { + if ($currentStatus !== $newStatus) { if ($newStatus == 'false') { $family->setDateDeactivated(date('YmdHis')); } elseif ($newStatus == 'true') { diff --git a/src/api/routes/people/people-person.php b/src/api/routes/people/people-person.php index 2660b026b7..1f9715552c 100644 --- a/src/api/routes/people/people-person.php +++ b/src/api/routes/people/people-person.php @@ -40,7 +40,7 @@ $group->delete('', function (Request $request, Response $response, array $args): Response { $person = $request->getAttribute('person'); - if (AuthenticationManager::getCurrentUser()->getId() == $person->getId()) { + if (AuthenticationManager::getCurrentUser()->getId() === (int) $person->getId()) { throw new HttpForbiddenException($request, gettext("Can't delete yourself")); } $person->delete(); @@ -73,14 +73,14 @@ function setPersonRoleAPI(Request $request, Response $response, array $args): Re { $person = $request->getAttribute('person'); - $roleId = $args['roleId']; + $roleId = (int) $args['roleId']; $role = ListOptionQuery::create()->filterByOptionId($roleId)->findOne(); if (empty($role)) { throw new HttpNotFoundException($request, gettext('The role could not be found.')); } - if ($person->getFmrId() == $roleId) { + if ((int) $person->getFmrId() === $roleId) { return SlimUtils::renderJSON($response, ['success' => true, 'msg' => gettext('The role is already assigned.')]); } diff --git a/src/api/routes/people/people-properties.php b/src/api/routes/people/people-properties.php index b880e338de..f370b5038e 100644 --- a/src/api/routes/people/people-properties.php +++ b/src/api/routes/people/people-properties.php @@ -77,7 +77,7 @@ function getFamilyProperties(Request $request, Response $response, array $args): return getProperties($response, 'f', $family->getId()); } -function getProperties(Response $response, $type, $id): Response +function getProperties(Response $response, string $type, int $id): Response { $properties = RecordPropertyQuery::create() ->filterByRecordId($id) @@ -87,7 +87,7 @@ function getProperties(Response $response, $type, $id): Response foreach ($properties as $property) { $rawProp = $property->getProperty(); - if ($rawProp->getProClass() == $type) { + if ($rawProp->getProClass() === $type) { $tempProp = []; $tempProp['id'] = $property->getPropertyId(); $tempProp['name'] = $rawProp->getProName(); diff --git a/src/api/routes/system/system-database.php b/src/api/routes/system/system-database.php index a732fa8119..4dbabca5f4 100644 --- a/src/api/routes/system/system-database.php +++ b/src/api/routes/system/system-database.php @@ -152,7 +152,7 @@ function exportChMeetings(Request $request, Response $response, array $args): Re $family = $person->getFamily(); $anniversary = ($family ? $family->getWeddingdate(SystemConfig::getValue('sDateFormatLong')) : ''); $familyRole = $person->getFamilyRoleName(); - if ($familyRole == 'Head of Household') { + if ($familyRole === 'Head of Household') { $familyRole = 'Primary'; } @@ -229,7 +229,7 @@ function resetDatabase(Request $request, Response $response): Response $dbTablesSQLs = $statement->fetchAll(); foreach ($dbTablesSQLs as $dbTable) { - if ($dbTable[1] == 'VIEW') { + if ($dbTable[1] === 'VIEW') { $alterSQL = 'DROP VIEW ' . $dbTable[0] . ' ;'; } else { $alterSQL = 'DROP TABLE ' . $dbTable[0] . ' ;'; diff --git a/src/bin/google-map/GoogleMap.php b/src/bin/google-map/GoogleMap.php index 47186a2b94..4323968602 100644 --- a/src/bin/google-map/GoogleMap.php +++ b/src/bin/google-map/GoogleMap.php @@ -865,7 +865,7 @@ public function addDirections($start_address = '', $dest_address = '', $dom_id = $elevation_dom_id = 'elevation' . $dom_id; } - if ($start_address != '' && $dest_address != '' && $dom_id != '') { + if ($start_address !== '' && $dest_address !== '' && $dom_id !== '') { $this->_directions[$dom_id] = [ 'dom_id' => $dom_id, 'start' => $start_address, diff --git a/src/composer.json b/src/composer.json index 05f9b288b8..4c50879a9b 100644 --- a/src/composer.json +++ b/src/composer.json @@ -67,6 +67,12 @@ "rector/rector": "^1.0", "squizlabs/php_codesniffer": "^3.7" }, + "replace": { + "symfony/polyfill-mbstring": "*", + "symfony/polyfill-php73": "*", + "symfony/polyfill-php80": "*", + "symfony/polyfill-php81": "*" + }, "repositories": { "packagist": { "type": "composer", @@ -100,4 +106,4 @@ "@orm-gen" ] } -} \ No newline at end of file +} diff --git a/src/composer.lock b/src/composer.lock index e8a0663ed6..4aeea42d82 100644 --- a/src/composer.lock +++ b/src/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5895a03784fe8f2378cb83c149c33fd6", + "content-hash": "6efccd6f22f6543353d40a461297dae1", "packages": [ { "name": "azuyalabs/yasumi", @@ -439,16 +439,16 @@ }, { "name": "endroid/qr-code", - "version": "5.0.9", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/endroid/qr-code.git", - "reference": "3dcdfab4c9122874f3915d8bf80a43b9df11852d" + "reference": "393fec6c4cbdc1bd65570ac9d245704428010122" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/endroid/qr-code/zipball/3dcdfab4c9122874f3915d8bf80a43b9df11852d", - "reference": "3dcdfab4c9122874f3915d8bf80a43b9df11852d", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/393fec6c4cbdc1bd65570ac9d245704428010122", + "reference": "393fec6c4cbdc1bd65570ac9d245704428010122", "shasum": "" }, "require": { @@ -499,7 +499,7 @@ ], "support": { "issues": "https://github.com/endroid/qr-code/issues", - "source": "https://github.com/endroid/qr-code/tree/5.0.9" + "source": "https://github.com/endroid/qr-code/tree/5.1.0" }, "funding": [ { @@ -507,7 +507,7 @@ "type": "github" } ], - "time": "2024-05-08T08:09:28+00:00" + "time": "2024-09-08T08:52:55+00:00" }, { "name": "geocoder-php/bing-maps-provider", @@ -3769,20 +3769,20 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", - "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -3827,7 +3827,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -3843,24 +3843,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -3908,319 +3908,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-05-31T15:07:36+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/ec444d3f3f6505bb28d11afa41e75faadebc10a1", - "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-05-31T15:07:36+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-05-31T15:07:36+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -5129,16 +4817,16 @@ "packages-dev": [ { "name": "phpstan/phpstan", - "version": "1.12.2", + "version": "1.12.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "0ca1c7bb55fca8fe6448f16fff0f311ccec960a1" + "reference": "ffa517cb918591b93acc9b95c0bebdcd0e4538bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0ca1c7bb55fca8fe6448f16fff0f311ccec960a1", - "reference": "0ca1c7bb55fca8fe6448f16fff0f311ccec960a1", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ffa517cb918591b93acc9b95c0bebdcd0e4538bd", + "reference": "ffa517cb918591b93acc9b95c0bebdcd0e4538bd", "shasum": "" }, "require": { @@ -5183,25 +4871,25 @@ "type": "github" } ], - "time": "2024-09-05T16:09:28+00:00" + "time": "2024-09-19T07:58:01+00:00" }, { "name": "rector/rector", - "version": "1.2.4", + "version": "1.2.5", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "42a4aa23b48b4cfc8ebfeac2b570364e27744381" + "reference": "e98aa793ca3fcd17e893cfaf9103ac049775d339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/42a4aa23b48b4cfc8ebfeac2b570364e27744381", - "reference": "42a4aa23b48b4cfc8ebfeac2b570364e27744381", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/e98aa793ca3fcd17e893cfaf9103ac049775d339", + "reference": "e98aa793ca3fcd17e893cfaf9103ac049775d339", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.11.11" + "phpstan/phpstan": "^1.12.2" }, "conflict": { "rector/rector-doctrine": "*", @@ -5234,7 +4922,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/1.2.4" + "source": "https://github.com/rectorphp/rector/tree/1.2.5" }, "funding": [ { @@ -5242,20 +4930,20 @@ "type": "github" } ], - "time": "2024-08-23T09:03:01+00:00" + "time": "2024-09-08T17:43:24+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.2", + "version": "3.10.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017" + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", "shasum": "" }, "require": { @@ -5322,7 +5010,7 @@ "type": "open_collective" } ], - "time": "2024-07-21T23:26:44+00:00" + "time": "2024-09-18T10:38:58+00:00" } ], "aliases": [], diff --git a/src/v2/routes/people.php b/src/v2/routes/people.php index 2f260bfd55..bea9274942 100644 --- a/src/v2/routes/people.php +++ b/src/v2/routes/people.php @@ -87,9 +87,9 @@ function listPeople(Request $request, Response $response, array $args): Response $filterByClsId = ''; if (isset($_GET['Classification'])) { - $id = InputUtils::legacyFilterInput($_GET['Classification']); + $id = InputUtils::filterInt($_GET['Classification']); $option = ListOptionQuery::create()->filterById(1)->filterByOptionId($id)->findOne(); - if ($id == 0) { + if ($id === 0) { $filterByClsId = gettext('Unassigned'); $sMode = $filterByClsId; } else { @@ -100,10 +100,10 @@ function listPeople(Request $request, Response $response, array $args): Response $filterByFmrId = ''; if (isset($_GET['FamilyRole'])) { - $id = InputUtils::legacyFilterInput($_GET['FamilyRole']); + $id = InputUtils::filterInt($_GET['FamilyRole']); $option = ListOptionQuery::create()->filterById(2)->filterByOptionId($id)->findOne(); - if ($id == 0) { + if ($id === 0) { $filterByFmrId = gettext('Unassigned'); $sMode = $filterByFmrId; } else { @@ -114,7 +114,7 @@ function listPeople(Request $request, Response $response, array $args): Response $filterByGender = ''; if (isset($_GET['Gender'])) { - $id = InputUtils::legacyFilterInput($_GET['Gender']); + $id = InputUtils::filterInt($_GET['Gender']); switch ($id) { case 0: diff --git a/src/v2/routes/user.php b/src/v2/routes/user.php index 165035c518..423b82ced1 100644 --- a/src/v2/routes/user.php +++ b/src/v2/routes/user.php @@ -36,9 +36,9 @@ function viewUser(Request $request, Response $response, array $args): Response { $renderer = new PhpRenderer('templates/user/'); $curUser = AuthenticationManager::getCurrentUser(); - $userId = $args['id']; + $userId = (int) $args['id']; - if (!$curUser->isAdmin() && $curUser->getId() != $userId) { + if (!$curUser->isAdmin() && $curUser->getId() !== $userId) { throw new HttpForbiddenException($request); } diff --git a/src/v2/templates/cart/cartempty.php b/src/v2/templates/cart/cartempty.php index 99623715a2..4e9903dcd8 100644 --- a/src/v2/templates/cart/cartempty.php +++ b/src/v2/templates/cart/cartempty.php @@ -14,7 +14,7 @@ case 'aMessage': $event = EventQuery::create()->findPk($_GET['iEID']); ?> -

+

getTitle()?>

isSendNewsletter() ? "check" : "times") ?>"> getWorkPhone() != "") { + if ($family->getWorkPhone() !== "") { ?>
  • : getWorkPhone() ?>
  • getCellPhone() != "") { + if ($family->getCellPhone() !== "") { ?>
  • : getCellPhone() ?>
  • getEmail() != "") { + if ($family->getEmail() !== "") { ?>
  • :