pasamio / jwcp

Automatically exported from code.google.com/p/jwcp
0 stars 0 forks source link

Error during commit #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In the client, add option to one of my menus
2. Go to WC
3. Press Commit

What is the expected output? What do you see instead?
Expected that it would commit my changes. Got the following error:

Catchable fatal error: Object of class stdClass could not be converted to 
string in 
/home/w4547317/domains/taijimeerhoven.nl/public_html/content/child/administ
rator/components/com_wcp/helper.php on line 977

What version of the product are you using? On what operating system?
Version 1.0.0

Please provide any additional information below.
I have attached a screenshot of the differences result.

Original issue reported on code.google.com by swe...@xs4all.nl on 11 Sep 2009 at 5:26

Attachments:

GoogleCodeExporter commented 9 years ago
I created a patch (i.e. replaced step 3 with Create Patch) and applied is 
succesfully 
to the master

Original comment by swe...@xs4all.nl on 11 Sep 2009 at 5:37

GoogleCodeExporter commented 9 years ago
Thanks for the info!

Variable name conflict, change $rows variable name on lines 956, 964

Original comment by edo...@gmail.com on 13 Sep 2009 at 6:14

GoogleCodeExporter commented 9 years ago
Like this?

switch($action) {
                case 'add':
                    list($table_ddl) = array_values($db->getTableCreate($table));
                    $table_ddl = preg_replace('/'.str_replace('#__', $db-
>_table_prefix, $table).'/', $table, $table_ddl, 1);
                    $master_db->setQuery($table_ddl);
                    $master_db->query();
                    $db->setQuery('select * from ' . $table);
                    $rs = $db->loadObjectList();
                    foreach($rs as $row)
                        $master_db->insertObject($table, $row);
                    break;
                case 'update':
                    $master_db->setQuery('truncate table ' . $table);
                    $master_db->query();
                    $db->setQuery('select * from ' . $table);
                    $rs = $db->loadObjectList();
                    foreach($rs as $row)
                        $master_db->insertObject($table, $row);
                    break;
                case 'delete':
                    $master_db->setQuery('drop table if exists ' . $table);
                    $master_db->query();
                    break;
            }

The conflict was with the $rows variable online 976?

Original comment by swe...@xs4all.nl on 13 Sep 2009 at 11:23

GoogleCodeExporter commented 9 years ago
Correct, that will work.

Original comment by edo...@gmail.com on 13 Sep 2009 at 4:35

GoogleCodeExporter commented 9 years ago

Original comment by edo...@gmail.com on 13 Sep 2009 at 8:33