fix: long urls not being truncated
This commit is contained in:
parent
744524fbe6
commit
c8c257122d
1 changed files with 9 additions and 9 deletions
|
@ -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(
|
||||
|
@ -229,10 +229,10 @@ 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_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);
|
||||
|
||||
$database
|
||||
->query(
|
||||
|
|
Loading…
Reference in a new issue