1
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..