From c3fab4c54cb0e6044b177ab7c80d797153c77d63 Mon Sep 17 00:00:00 2001 From: jfefe Date: Sun, 11 Mar 2018 16:48:26 +0100 Subject: [PATCH] Fix Phpunit issue --- htdocs/core/modules/ticketsup/mod_ticketsup_simple.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/ticketsup/mod_ticketsup_simple.php b/htdocs/core/modules/ticketsup/mod_ticketsup_simple.php index 25fabb12377..f0293f78d1f 100644 --- a/htdocs/core/modules/ticketsup/mod_ticketsup_simple.php +++ b/htdocs/core/modules/ticketsup/mod_ticketsup_simple.php @@ -73,7 +73,8 @@ class mod_ticketsup_simple extends ModeleNumRefTicketsup $posindice = 8; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM " . $posindice . ") AS SIGNED)) as max"; $sql .= " FROM " . MAIN_DB_PREFIX . "ticketsup"; - $sql .= " WHERE ref LIKE '" . $this->prefix . "____-%'"; + $search = $this->prefix . "____-%"; + $sql .= " WHERE ref LIKE '" . $search ."'"; $sql .= " AND entity = " . $conf->entity; $resql = $db->query($sql); if ($resql) { @@ -107,7 +108,8 @@ class mod_ticketsup_simple extends ModeleNumRefTicketsup $posindice = 8; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM " . $posindice . ") AS SIGNED)) as max"; $sql .= " FROM " . MAIN_DB_PREFIX . "ticketsup"; - $sql .= " WHERE ref like '" . $this->prefix . "____-%'"; + $search = $this->prefix . "____-%"; + $sql .= " WHERE ref LIKE '" . $search ."'"; $sql .= " AND entity = " . $conf->entity; $resql = $db->query($sql);