Page 1 of 1

Error in Phoca-PDF ;)

Posted: 05 Dec 2016, 12:59
by crusader
Hello, i found a Error in Phoca PDF:

My system:
Joomla 3.6.4
Phoca PDF 3.0.3

The Error-Message is "Fatal error: Can't use function return value in write context in /administrator/components/com_phocapdf/models/phocapdffonts.php on line 476 "

The original Code is:

Code: Select all

		 if (!empty(JFolder::files($extractdir, '')) &&  !empty(JFolder::files($extractdir, ''))) {
			$dirList = array_merge(JFolder::files($extractdir, ''), JFolder::folders($extractdir, ''));
		 } else if (!empty(JFolder::files($extractdir, ''))) {
			$dirList = JFolder::files($extractdir, '');
		 } else if (!empty(JFolder::files($extractdir, ''))) {
			$dirList = JFolder::folders($extractdir, '');
		 }
The fixed Code is:

Code: Select all

         $stuff = \JFolder::files ($extractdir, '');
		 if (!empty ($stuff)) {
		    $dirList = \array_merge ($stuff, \JFolder::folders ($extractdir, ''));
		 }
         elseif (!empty ($stuff)) {
            $dirList = $stuff;
         }
         elseif (!empty ($stuff)) {
            $dirList = \JFolder::folders ($extractdir, '');
		 }

Re: Error in Phoca-PDF ;)

Posted: 07 Dec 2016, 18:45
by Jan
Hi, thank you for the info, which PHP version do you use?

Jan

Re: Error in Phoca-PDF ;)

Posted: 05 Oct 2017, 15:24
by Jan