1
dreamgear
trying to fix a minor wfsections bug, and...
  • 2004/2/28 16:03

  • dreamgear

  • Friend of XOOPS

  • Posts: 78

  • Since: 2002/7/18


In the list of downloadable files displayed in an article, the description field is always displayed as "No description for file.".

I put the following debug lines in article.php after line 116: (just before the article description is set)

$debfil fopen("/tmp/debugfile""a");
$fildescrtmp $file->getFiledescript();
fwrite($debfil,$file->getFiledescript().".n");
fwrite($debfil,$fildescrtmp."..n");
if (empty(
$file->getFiledescript)) {fwrite($debfil,"seems empty.n");}
if (!empty(
$fildescrtmp)) {fwrite($debfil,"doesn't seems empty..n");}
fclose($debfil);


I get the following debug output:

file description here.
file description here..
seems empty.
doesn't seems empty..



When the output of the method getFiledescript is tested, it seems to be "empty". But when it's stored in a variable first it tests "not empty". Not being the world's hottest PHP guru, I don't understand why that is the case.

Could someone help me understand why?

This test for empty is why it is always displayed as "No description for file".

This may well be fixed in future/beta version of wfsection, but humor me..


2
JackJ
Re: trying to fix a minor wfsections bug, and...
  • 2004/2/28 16:27

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


To fix file description

modules/wfsection/article.php

about line 117

//if (empty($file->getFiledescript)) {
if (empty($file->filedescript)) {


Login

Who's Online

162 user(s) are online (83 user(s) are browsing Support Forums)


Members: 0


Guests: 162


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits