VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: emel on July 28, 2013, 19:58:58 PM

Title: small bug: Default Font Warning: Invalid argument supplied for foreach()
Post by: emel on July 28, 2013, 19:58:58 PM
hi there

within shop, invoice configuration, i discovered a small bug within my platform.

where the Default Font field is, the following error shows:    
Warning: Invalid argument supplied for foreach() in /home/users/wijobftp/MYDOMAIN/libraries/joomla/html/html/select.php on line 504

how can i make this go away...

thx
emel
Title: Re: small bug: Default Font Warning: Invalid argument supplied for foreach()
Post by: kvzmd on August 26, 2013, 10:28:23 AM
Hi, emel

I have exatly the same warning. Did you manage to solve it? Please share.
Title: Re: small bug: Default Font Warning: Invalid argument supplied for foreach()
Post by: Maxim Pishnyak on August 28, 2013, 21:27:15 PM
Maybe just turn off displaying these unimportant warnings in Joomla configuration?
Title: Re: small bug: Default Font Warning: Invalid argument supplied for foreach()
Post by: mronayne on September 17, 2013, 16:52:42 PM
I have the exact same "Warning". Simply turning off warnings doesn't fix the problem - it only hides it so you don't have to look at it. The bottom line is that on the "Shop -> Invoices" form the "Default Font" select field shows nothing due to this "Warning".
I suspect that an argument from "administrator\components\com_virtuemart\tables\vendors.php" or "administrator\components\com_virtuemart\views\user\tmpl\edit_vendorletter.php" is being constructed incorrectly or passed incorrectly? Just a guess?

Update: After a bit of playing around the offending argument is "$this->pdfFonts" around line 126 -> "echo JHTML::_('Select.genericlist', $this->pdfFonts, 'vendor_letter_font', 'size', 'value', 'text', $this->vendor->vendor_letter_font); in "administrator\components\com_virtuemart\views\user\tmpl\edit_vendorletter.php". Somehow the array argument $this->pdfFonts is not constructed properly.

I am running VM 2.0.22c with Joomla 2.5.14
Title: Re: small bug: Default Font Warning: Invalid argument supplied for foreach()
Post by: Milbo on September 17, 2013, 23:33:16 PM
thanks

try in models/config.php around line 110 instead of $result = ''; just $result = array();