Undefined property: stdClass::$numsubcat

Phoca Download - download manager
fabo92
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 17 May 2010, 15:17

Undefined property: stdClass::$numsubcat

Post by fabo92 »

Hello,

I'm having this issue in a "List of categories" view.

Code: Select all

Notice: Undefined property: stdClass::$numsubcat in C:\xampp\htdocs\aet\components\com_phocadownload\models\categories.php on line 49
If there are no subcategories it doesn't display this message. Once I create one or more subcategories, this message appear.

I can't figure out what is missing, as $numsubcat should be defined (or not?).
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Undefined property: stdClass::$numsubcat

Post by Jan »

Hi, which version of Phoca Download you are running?

Jan
If you find Phoca extensions useful, please support the project
fabo92
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 17 May 2010, 15:17

Re: Undefined property: stdClass::$numsubcat

Post by fabo92 »

Last version, 3.0.5
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Undefined property: stdClass::$numsubcat

Post by Jan »

Hi, I see now, I have it fixed on localhost and will add it to next version, for now please do a quick fix:

Line cca 111 in file: components\com_phocadownload\models\categories.php
FROM:

Code: Select all

$query =  " SELECT cc.id, cc.parent_id, cc.title, cc.alias, cc.access, cc.description, cc.accessuserid, COUNT(c.id) AS numdoc"
TO:

Code: Select all

$query =  " SELECT cc.id, cc.parent_id, cc.title, cc.alias, cc.access, cc.description, cc.accessuserid, COUNT(c.id) AS numdoc, 0 AS numsubcat"
Jan
If you find Phoca extensions useful, please support the project
fabo92
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 17 May 2010, 15:17

Re: Undefined property: stdClass::$numsubcat

Post by fabo92 »

Hi, thank you very much for the reply. This solved my problem!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Undefined property: stdClass::$numsubcat

Post by Jan »

Fixed in 3.0.6

Jan
If you find Phoca extensions useful, please support the project
Post Reply