Minor fix in the Database::select function due the recent parse_conditions "order" changes

skala
Julio Montoya 13 years ago
parent dd485c16d4
commit ff6657041b
  1. 2
      main/inc/lib/database.lib.php
  2. 2
      main/inc/lib/database.mysqli.lib.php

@ -1241,7 +1241,7 @@ class Database {
$order_array = $condition_data;
if (!empty($order_array)) {
if (count($order_array) >= 1 && !empty($order_array[0])) {
if (is_array($order_array) && count($order_array) >= 1 && !empty($order_array[0])) {
$order_array = self::escape_string($order_array[0]);
$new_order_array = explode(',', $order_array);

@ -1159,7 +1159,7 @@ class Database {
$order_array = $condition_data;
if (!empty($order_array)) {
if (count($order_array) >= 1 && !empty($order_array[0])) {
if (is_array($order_array) && count($order_array) >= 1 && !empty($order_array[0])) {
$order_array = self::escape_string($order_array[0]);
$new_order_array = explode(',', $order_array);

Loading…
Cancel
Save