Error in Phoca-PDF ;)

Phoca PDF - creating PDF documents in Joomla! CMS
crusader
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 05 Dec 2016, 12:41

Error in Phoca-PDF ;)

Post 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, '');
		 }
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error in Phoca-PDF ;)

Post by Jan »

Hi, thank you for the info, which PHP version do you use?

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error in Phoca-PDF ;)

Post by Jan »

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