CaldwellYSR
Member
So I've run into a problem with Joomla! I've posted on the joomla forums but nobody seems to answer me and I've gotten good responses from here before so hopefully someone can help me.
The problem is when I go to add any new content to the back-end of my joomla site, I can't do it. At the top of the page I'm getting three warnings that look like:
So if I go to line 727 of the file it's giving me it says:
I don't know enough php to completely understand this but it's the last foreach that is causing the problems. I THINK it has to do with getting the values from the boxes where I type in the article title and whatnot. I'm probably wrong though...
and then if I try to fill out the new article and save it despite the warnings it says:
This is the second time I've had this problem. The first time it happened I googled and googled to find the answer and for the first time in a long time google failed me. So I did a fresh install of xampp and joomla! and made the sit again and now the same problem has come up. This is my first site building my own theme instead of just using the themes given to me by default. It's getting quite frustrating to tell my friend that her site is ready to go just to tell her it's broken again. I'm doing all of this locally on my computer for now, I was planning on putting the site online when we got everything finalized. Any help fixing this would be appreciated so that I can get my first real website online.
The problem is when I go to add any new content to the back-end of my joomla site, I can't do it. At the top of the page I'm getting three warnings that look like:
Warning: Invalid argument supplied for foreach() in /Applications/XAMPP/xamppfiles/htdocs/libraries/joomla/database/database/mysqli.php on line 727
Warning: Invalid argument supplied for foreach() in /Applications/XAMPP/xamppfiles/htdocs/libraries/joomla/database/database/mysqli.php on line 727
Warning: Invalid argument supplied for foreach() in /Applications/XAMPP/xamppfiles/htdocs/libraries/joomla/database/database/mysqli.php on line 727
So if I go to line 727 of the file it's giving me it says:
PHP:
/**
* Retrieves information about the given tables
*
* @param array|string A table name or a list of table names
* @param boolean Only return field types, default true
* @return array An array of fields by table
*/
public function getTableFields($tables, $typeonly = true)
{
settype($tables, 'array'); //force to array
$result = array();
foreach ($tables as $tblval) {
$this->setQuery('SHOW FIELDS FROM ' . $tblval);
$fields = $this->loadObjectList();
if ($typeonly) {
foreach ($fields as $field) {
$result[$tblval][$field->Field] = preg_replace("/[(0-9)]/",'', $field->Type);
}
} else {
foreach ($fields as $field) {
$result[$tblval][$field->Field] = $field;
}
}
}
return $result;
}
I don't know enough php to completely understand this but it's the last foreach that is causing the problems. I THINK it has to do with getting the values from the boxes where I type in the article title and whatnot. I'm probably wrong though...
and then if I try to fill out the new article and save it despite the warnings it says:
Save failed with the following error: Please provide a valid, non-blank title.
This is the second time I've had this problem. The first time it happened I googled and googled to find the answer and for the first time in a long time google failed me. So I did a fresh install of xampp and joomla! and made the sit again and now the same problem has come up. This is my first site building my own theme instead of just using the themes given to me by default. It's getting quite frustrating to tell my friend that her site is ready to go just to tell her it's broken again. I'm doing all of this locally on my computer for now, I was planning on putting the site online when we got everything finalized. Any help fixing this would be appreciated so that I can get my first real website online.
Last edited: