I installed a script and when I login to admin dashboard am getting this error:
Warning (2): simplexml_load_file(): /app/Plugin/PaypalAdaptive/info.xml:7: parser error : xmlParseEntityRef: no name [APP/Controller/PluginsController.php, line 1151]
I checked the file pluginscontroller.php
and this is the code. I copied from part of the entire file.
Line 1151 is: $xml = simplexml_load_file($file);
Full code starts here:
// get all installed plugins
$plugins = $this->Plugin->find( 'all', array(
'order' => 'id DESC'
));
$totalNewVersion = 0;
if($plugins != null)
{
foreach($plugins as $k => $plugin)
{
$plugin = $plugin['Plugin'];
$file = sprintf(PLUGIN_INFO_PATH, $plugin['key']);
if(file_exists($file))
{
$xml = simplexml_load_file($file);
if($xml != null && isset($xml->version))
{
if((string)$xml->version > $plugin['version'])
{
$totalNewVersion += 1;
}
}
}
}
}
return $totalNewVersion;
}
public function admin_do_upgrade( $id )
{
if(!$this->Plugin->hasAny(array('id' => $id)))
{
$this->Session->setFlash(__('This plugin does not exist'), 'default', array('class' => 'Metronic-alerts alert alert-danger fade in' ));
}
else
{