fix: long urls not being truncated

This commit is contained in:
grandeljay 2023-09-20 17:43:58 +02:00
parent 744524fbe6
commit c8c257122d

View file

@ -142,11 +142,11 @@ switch ($_SERVER['REQUEST_METHOD']) {
}
/** Update */
$wish_title = empty($wish_title) ? null : substr($wish_title, 0, 128) ;
$wish_description = empty($wish_description) ? null : $wish_description ;
$wish_image = empty($wish_image) || Wish::NO_IMAGE === $wish_image ? null : $wish_image ;
$wish_url = empty($wish_url) ? null : Wish::getAffiliateLink($wish_url);
$wish_priority = empty($wish_priority) ? null : $wish_priority ;
$wish_title = empty($wish_title) ? null : substr($wish_title, 0, 128);
$wish_description = empty($wish_description) ? null : $wish_description;
$wish_image = empty($wish_image) || Wish::NO_IMAGE === $wish_image ? null : $wish_image;
$wish_url = empty($wish_url) ? null : substr(Wish::getAffiliateLink($wish_url), 0, 255);
$wish_priority = empty($wish_priority) ? null : $wish_priority;
$database
->query(
@ -232,7 +232,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
$wish_title = empty($wish_title) ? null : substr($wish_title, 0, 128) ;
$wish_description = empty($wish_description) ? null : $wish_description ;
$wish_image = empty($wish_image) || Wish::NO_IMAGE === $wish_image ? null : $wish_image ;
$wish_url = empty($wish_url) ? null : Wish::getAffiliateLink($wish_url);
$wish_url = empty($wish_url) ? null : substr(Wish::getAffiliateLink($wish_url), 0, 255);
$database
->query(