Error by sending Form

adenora

New Member
Hi!

I have just a little, simple contactform.
When i submit the form, i'll get this error:
------------------
Warning: Invalid argument supplied for foreach() in /var/www/virtual/mydomain.com/htdocs/components/com_fabrik/fabrik_table.class.php on line 2203
------------------

Line 2203 says:
------------------
foreach ($this->_oForm->_groups as $oGroup) {
------------------

Any ideas?

Fabrik 1.0.6
Joomla 1.0.15

Thanx!

Mike
on line 2198 in /components/com_fabrik/fabrik_table.class.php

HTML:
    function getTableFilters2( )
    {
        $aFilters = array();
        $form =& $this->getForm();
        $form->getFormGroupsHiarachy();

        foreach ($this->_oForm->_groups as $oGroup) {
            foreach ($oGroup->_aElements as $oElement) {
                if ($oElement->filter_type <> '' && $oElement->can_filter == '1') {
                    $aFilters[] = $oElement;
                }
            }
        }
        return $aFilters;
    }
remplace by

HTML:
    function getTableFilters2( )
    {
        $aFilters = array();
        $form =& $this->getForm();
        $form->getFormGroupsHiarachy();
        if (is_array($this))
         {
        foreach ($this->_oForm->_groups as $oGroup) {
            foreach ($oGroup->_aElements as $oElement) {
                if ($oElement->filter_type <> '' && $oElement->can_filter == '1') {
                    $aFilters[] = $oElement;
                }
            }
        }
        }
        return $aFilters;
    }
in php5 there is no problem

best regards
 
That'll just kill the table filters, period, because $this is never an array (it's an object).

I beliueve you posted this is another thread, where I asked for a backend login. The way to fix this is to find out why _groups is empty (which it should never ben a form should always have at least one group on it).

-- hugh
 
Idem

Hello
sorry for my english y'am french

y have error "fabrik_table.class.php on line 2203" and if applicate the hack the requets not
search on my base
thank
 
re

thank you for reply
last version svn 1.06
joomla 1.0.15
it works in my movamp serveur but not works in my serveur 1and1(perhaps because off php 4xx???)
thank
 
Can one of you guys PM me a Joomla backend login, and either an ftp account (with write access on the com_fabrik folders), or have JoomlaExplorer installed.

Don't forget to include a link back to this thread in your PM.

Once we have login details, we can put in some debug code.

It does appear to be a PHP4 vs PHP5 issue, but right now neither Rob nor I have a PHP4 machine to test with.

-- hugh
 
Just to let y'all know we are still working on tracking this one down. Someone else gave us a login to a server with the same issue.

-- hugh
 
Still working on it. It's definitely a PHP4 vs PHP5 issue, but we just don't seem to be able to track it down.

I'm probably going to have to install a complete PHP4 test server, so I can run some real time xdebug sessions. My XAMPP install is supposed to have a PHP4/5 switch, but last time I tried switching to PHP4 the whole thing blew up and it took me half a day to get the server running again.

I should warn you that we are very seriously considering dropping support for PHP4. We're just two people working part time, and we don't have the resources to develop, maintain and support two major versions of Fabrik on two different languages (make no mistake, PHP4 and PHP5 are very different from a developers point of view). We're having to spend more and more time spinning our wheels chasing PHP4 v 5 issues, which is seriously cutting into our dev and support time.

PHP4 has been end-of-lifed since the start of this year, and as of Dec 31st this year it will be officially killed off, no more support, updates or bug fixes at all from the PHP authors.

We realize that this will inconvenience some people. But given that Joomla itself is dropping support for PHP4 in Joomla 1.6, we're not the only ones!

We haven't yet set a date, but at the moment it looks like we're essentially dropping PHP4 support for Fabrik 2.0 right now, and will drop it for Fabrik 1.0.x some time in the next month or two.

-- hugh
 
Hello.

Is there any development in this? I am having the same error and "my" server has PHP5 (5.2.4)

I just updated to Fabrik 1.0.6 and before (1.0.4) I didn't had this problem.

Thanks!
Bruno
 
Interesting, we've never seen this error on anything but a subset of PHP4 versions.

Do you mind giving me some access to your server? If it's OK, PM me a backend login and a url to the affected form. I'll probably also need ftp or JoomlaExplorer access so I can upload some debug code.

-- hugh
 
Well actually the problem is simpoly hidden, not gone. :)

I put in some defensive coding so it won't try and access the groups array if it is empty ... but the thing is, it should never be empty ...

So you may find problems if you try and use table pre-filters on that page.

On the whole, we've found the most reliable way to actually fix this issue is to upgrade to a recent version of PHP5.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top