small bug: Default Font Warning: Invalid argument supplied for foreach()

Started by emel, July 28, 2013, 19:58:58 PM

Previous topic - Next topic

emel

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

kvzmd

Hi, emel

I have exatly the same warning. Did you manage to solve it? Please share.

Maxim Pishnyak

Maybe just turn off displaying these unimportant warnings in Joomla configuration?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

mronayne

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

Milbo

thanks

try in models/config.php around line 110 instead of $result = ''; just $result = array();
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/