Skip to content

Commit

Permalink
Add missing ` in SQL queries
Browse files Browse the repository at this point in the history
...which cause trouble on mysql 8.x
  • Loading branch information
instantflorian committed Feb 15, 2021
1 parent 30815a9 commit bd0c284
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wbce/framework/initialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
// @todo check if we better use MYSQL FIND_IN_SET (http://forum.wbce.org/viewtopic.php?id=84)

// Query gives back false on failure
if (($resSnippets = $database->query("SELECT `directory` FROM `{TP}addons` WHERE function LIKE '%preinit%'"))) {
if (($resSnippets = $database->query("SELECT `directory` FROM `{TP}addons` WHERE `function` LIKE '%preinit%'"))) {
while ($rec = $resSnippets->fetchRow()) {
$sModFilePath = dirname(__DIR__) . '/modules/' . $rec['directory'] . '/preinit.php';
if (file_exists($sModFilePath)) {
Expand Down
2 changes: 1 addition & 1 deletion wbce/include/Sensio/Twig/WBCETwigLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function getTwig($uTemplateLocs = null, $iSectionID = null, $uCache = false) {
foreach (glob(__DIR__ . "/SimpleFunctions/tsf_*.php") as $sFile) include $sFile;

// Load external Twig_SimpleFunction files from modules which have the 'twig_extend' marker set
$sSql = 'SELECT `directory` FROM `{TP}addons` WHERE function LIKE \'%twig_extend%\' ';
$sSql = 'SELECT `directory` FROM `{TP}addons` WHERE `function` LIKE \'%twig_extend%\' ';
if (($aExtends = $GLOBALS['database']->get_array($sSql))) {
foreach ($aExtends as $rec) {
$sFile = WB_PATH . '/modules/' . $rec['directory'] . '/TwigFunctions.php';
Expand Down

0 comments on commit bd0c284

Please sign in to comment.