-1

I developed one Joomla Component. In Administrator Part I display Dynamic Category using helper/select.php file. But I got this error:

Strict Standards: Non-static method TrueMatrimonyHelperSelect::getProfileforlist() should not be called statically, assuming $this from incompatible context

XML Code:

<field name="createby" type="list" id="createby"                     
    source_file="admin://components/com_astrimony/helpers/select.php"
    source_class="TrueMatrimonyHelperSelect" source_method="getProfileforlist"
    sortable="true" tdwidth="15%" show_link="true" url="index.php?option=astrimony&amp;view=profile&amp;id=[ITEM:ID]"
    label="COM_MATRIMONY_REGISTER_FOR" 
/>

Select File Code

public function getProfileforlist($name='', $attr=array(), $selected_value='', $id='') {                
        $items = FOFModel::getTmpInstance('Profilerefers', 'TrueMatrimonyModel')->enabled(1)->getList(true);        
        $result = array();      
        $result[] = JHtml::_('select.option','',JText::_('COM_TRUEMATRIMONY_SELECT_PROFILE_FOR'));
        foreach($items as $item) {
            $result[$item->profilerefer_id] = $item->profile_reference;
        }   //print_r($result);exit;        
        return $result;
    }
Toby Speight
  • 27,591
  • 48
  • 66
  • 103
Karthik mathesh
  • 203
  • 1
  • 4
  • 12
  • Possible duplicate of [Strict Standards: Non-static method](http://stackoverflow.com/questions/15897797/strict-standards-non-static-method) – 1615903 Aug 10 '16 at 10:00

1 Answers1

0

Replace public function getProfileforlist to public static function getProfileforlist

he11d0g
  • 311
  • 1
  • 3
  • 8