Wallos: Open-source, self-hostable personal subscription tracker. Visualize your recurring expenses, manage your budget, and save money.
2 21 3 (#484)
Miguel Ribeiro082e80cdadbd
diff --git a/endpoints/payments/add.php b/endpoints/payments/add.phpindex 6a674ac..93ebf02 100644--- a/endpoints/payments/add.php+++ b/endpoints/payments/add.php@@ -115,13 +115,13 @@ function resizeAndUploadLogo($uploadedFile, $uploadDir, $name)$newHeight = $height;if ($width > $targetWidth) {- $newWidth = $targetWidth;- $newHeight = ($targetWidth / $width) * $height;+ $newWidth = (int)$targetWidth;+ $newHeight = (int)(($targetWidth / $width) * $height);}if ($newHeight > $targetHeight) {- $newWidth = ($targetHeight / $newHeight) * $newWidth;- $newHeight = $targetHeight;+ $newWidth = (int)(($targetHeight / $newHeight) * $newWidth);+ $newHeight = (int)$targetHeight;}$resizedImage = imagecreatetruecolor($newWidth, $newHeight);diff --git a/endpoints/subscription/add.php b/endpoints/subscription/add.phpindex b25d0a6..060cafc 100644--- a/endpoints/subscription/add.php+++ b/endpoints/subscription/add.php@@ -116,13 +116,13 @@ function resizeAndUploadLogo($uploadedFile, $uploadDir, $name, $settings)$newHeight = $height;if ($width > $targetWidth) {- $newWidth = $targetWidth;- $newHeight = ($targetWidth / $width) * $height;+ $newWidth = (int)$targetWidth;+ $newHeight = (int)(($targetWidth / $width) * $height);}if ($newHeight > $targetHeight) {- $newWidth = ($targetHeight / $newHeight) * $newWidth;- $newHeight = $targetHeight;+ $newWidth = (int)(($targetHeight / $newHeight) * $newWidth);+ $newHeight = (int)$targetHeight;}$resizedImage = imagecreatetruecolor($newWidth, $newHeight);diff --git a/endpoints/user/save_user.php b/endpoints/user/save_user.phpindex 0cf574a..0931a95 100644--- a/endpoints/user/save_user.php+++ b/endpoints/user/save_user.php@@ -153,13 +153,13 @@ function resizeAndUploadAvatar($uploadedFile, $uploadDir, $name)$newHeight = $height;if ($width > $targetWidth) {- $newWidth = $targetWidth;- $newHeight = ($targetWidth / $width) * $height;+ $newWidth = (int)$targetWidth;+ $newHeight = (int)(($targetWidth / $width) * $height);}if ($newHeight > $targetHeight) {- $newWidth = ($targetHeight / $newHeight) * $newWidth;- $newHeight = $targetHeight;+ $newWidth = (int)(($targetHeight / $newHeight) * $newWidth);+ $newHeight = (int)$targetHeight;}$resizedImage = imagecreatetruecolor($newWidth, $newHeight);diff --git a/includes/version.php b/includes/version.phpindex 7ba8249..3dadda1 100644--- a/includes/version.php+++ b/includes/version.php@@ -1,3 +1,3 @@<?php-$version = "v2.21.2";+$version = "v2.21.3";?>\ No newline at end of filediff --git a/settings.php b/settings.phpindex 144670a..a27c908 100644--- a/settings.php+++ b/settings.php@@ -53,7 +53,7 @@ require_once 'includes/header.php';</div><input type="file" id="profile_pic" class="hidden-input" name="profile_pic"accept="image/jpeg, image/png, image/gif, image/webp"- onChange="successfulUpload(this, '<?= translate('file_type_error', $i18n) ?>')" />+ onChange="successfulUpload(this, '<?= addslashes(translate('file_type_error', $i18n)) ?>')" /></div></div><div class="grow">@@ -1231,13 +1231,6 @@ require_once 'includes/header.php';<label for="hidedisabled"><?= translate('hide_disabled_subscriptions', $i18n) ?></label></div></div>- <div>- <div class="form-group-inline">- <input type="checkbox" id="disabledtobottom" name="disabledtobottom" onChange="setDisabledToBottom()" <?php if ($settings['disabled_to_bottom'])- echo 'checked'; ?>>- <label for="disabledtobottom"><?= translate('show_disabled_subscriptions_at_the_bottom', $i18n) ?></label>- </div>- </div></div></section>