Skip to content

Commit

Permalink
JTable getFields cache fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alex7r authored Jul 7, 2016
1 parent 44ee441 commit cbe9090
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/joomla/table/table.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,18 @@ public function getObserverOfClass($observerClass)
/**
* Get the columns from database table.
*
* @param bool $reload flag to reload cache
*
* @return mixed An array of the field names, or false if an error occurs.
*
* @since 11.1
* @throws UnexpectedValueException
*/
public function getFields()
public function getFields($reload = false)
{
static $cache = null;

if ($cache === null)
if ($cache === null || $reload)
{
// Lookup the fields for this table only once.
$name = $this->_tbl;
Expand Down

0 comments on commit cbe9090

Please sign in to comment.