mirror of
https://github.com/e107inc/e107.git
synced 2025-07-28 18:30:53 +02:00
Clear libxml errors in toRSS test. Forum shortcode fix.
This commit is contained in:
@@ -154,7 +154,7 @@ class forum_shortcodes extends e_shortcode
|
|||||||
// To be reworked to get the $forum var
|
// To be reworked to get the $forum var
|
||||||
$trackPref = varset($this->prefs['track']);
|
$trackPref = varset($this->prefs['track']);
|
||||||
|
|
||||||
if(!empty($trackPref) && $forum->checkPerm($this->var['forum_id'], 'post'))
|
if(!empty($trackPref) && is_object($forum) && $forum->checkPerm($this->var['forum_id'], 'post'))
|
||||||
{
|
{
|
||||||
$uInfo[2] = "<a href='".e107::url('forum','track')."'>".LAN_FORUM_0030."</a>";
|
$uInfo[2] = "<a href='".e107::url('forum','track')."'>".LAN_FORUM_0030."</a>";
|
||||||
}
|
}
|
||||||
|
@@ -539,11 +539,11 @@ while($row = $sql->fetch())
|
|||||||
*/
|
*/
|
||||||
public function testToRss()
|
public function testToRss()
|
||||||
{
|
{
|
||||||
if(PHP_VERSION_ID < 71000 )
|
/* if(PHP_VERSION_ID < 71000 )
|
||||||
{
|
{
|
||||||
$this->markTestSkipped("testToRSS() skipped. Requires a healthy libxml installation");
|
$this->markTestSkipped("testToRSS() skipped. Requires a healthy libxml installation");
|
||||||
return null;
|
return null;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
$tests = array(
|
$tests = array(
|
||||||
'[html]<pre class="prettyprint linenums" style="unicode-bidi: embed; direction: ltr;"></p><p><core name="e_jslib_plugin"><![CDATA[Array]]></core></p><p><core name="e_jslib_theme"><![CDATA[Array]]></core></pre>[/html]',
|
'[html]<pre class="prettyprint linenums" style="unicode-bidi: embed; direction: ltr;"></p><p><core name="e_jslib_plugin"><![CDATA[Array]]></core></p><p><core name="e_jslib_theme"><![CDATA[Array]]></core></pre>[/html]',
|
||||||
@@ -571,6 +571,7 @@ while($row = $sql->fetch())
|
|||||||
$xmlContent = '<?xml version="1.0" encoding="utf-8"?>'."\n".'<description>'.$xmlContent.'</description>';
|
$xmlContent = '<?xml version="1.0" encoding="utf-8"?>'."\n".'<description>'.$xmlContent.'</description>';
|
||||||
|
|
||||||
libxml_use_internal_errors(true);
|
libxml_use_internal_errors(true);
|
||||||
|
libxml_clear_errors();
|
||||||
|
|
||||||
$doc = new DOMDocument('1.0', 'utf-8');
|
$doc = new DOMDocument('1.0', 'utf-8');
|
||||||
$doc->loadXML($xmlContent);
|
$doc->loadXML($xmlContent);
|
||||||
@@ -579,7 +580,7 @@ while($row = $sql->fetch())
|
|||||||
|
|
||||||
if(!empty($errors))
|
if(!empty($errors))
|
||||||
{
|
{
|
||||||
var_dump($errors);
|
codecept_debug($errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
libxml_clear_errors();
|
libxml_clear_errors();
|
||||||
|
Reference in New Issue
Block a user