Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 1.6.0.13
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All-users
    • Labels:

      Description

      Bug found in 1.6.0.13 (classes/productsale.php)
      Function :static getBestSales

      Running:
      ProductSale::getBestSales((int)($params['cookie']->id_lang), 0, $prod_count);

      Will give a system crash. See below for details and FIX.

      line 71 1.6.0.13 ( Crashes because of ORDER BY is empty!!!)
      if ($order_by == 'date_add' || $order_by == 'date_upd')
      $order_table = 'product_shop';
      if (is_null($order_way) || $order_by == 'sales') $order_way = 'DESC';

      if i copy the Prestashop release 1.6.0.11 code( below ) it won't crash
      if (is_null($order_by) || $order_by == 'position' || $order_by == 'price') $order_by = 'sales';//THIS LINE OF CODE IS MISSING!!
      if ($order_by == 'date_add' || $order_by == 'date_upd')
      $order_table = 'product_shop';
      if (is_null($order_way) || $order_by == 'sales') $order_way = 'DESC';

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Gregory Gregory
                Reporter:
                venditdevs venditdevs
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: