WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.

Donate with PayPal buttonSpenden mit dem PayPal-Button

  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Bug in stock.php?
  • Print
Pages: [1]   Go Down

Author Topic: Bug in stock.php?  (Read 12546 times)

Offline ICE

  • Posts: 19
Bug in stock.php?
« on: May 29, 2017, 09:45:59 PM »
Hello, maybe, i found a bug in stock.php.

If i try to sort items in stock administration, following error appears:
Quote
Call to a member function numRows() on null in /modules/bakery/stock.php on line 111

So i searched in older versions of bakery and i found a solution:

In version 1.82 the line 47 in stock.php looks like this:
Quote
!empty($clause = $category) ? " AND section_id = $category" : '';

In older versions from bakery, line 47 in stock.php looks like this:
Quote
$clause = $category != '' ? " AND section_id = $category" : '';

When i remove "!empty" the sorting works fine ... What was the intention to add the "!empty" to this line?
Logged

freeSbee

  • Guest
Re: Bug in stock.php?
« Reply #1 on: May 30, 2017, 08:21:09 AM »
Bakery v1.82, stock.php line 47 should be:
Code: [Select]
$clause = !empty($category) ? " AND section_id = $category" : '';
Thanks for reporting!
Logged

Offline ICE

  • Posts: 19
Re: Bug in stock.php?
« Reply #2 on: May 30, 2017, 01:25:46 PM »
Thanks for your quick respond and fix!
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Bug in stock.php?
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2