【バグ・改善】 document.parser.class.inc.php 【解決済み】
Posted: 2012年8月09日(木) 12:03
最新バージョン(1.0.6-r5)でもそうだったんですが、「runSnippet」のコードに一部不足が見られました。
「$result」がフェッチされていないので、$rowがNULLとなり、外部PHPからのスニペットの呼び出しができませんでした。
1.0.6-r4にて以下の一行を挿入したら正常に動作しました。
以上、よろしくお願いいたします。
コード: 全て選択
function runSnippet($snippetName, $params= array ())
{
if (isset ($this->snippetCache[$snippetName]))
・・・・・・・・・・・・・・・・・・・・・・・・・・・・・
if ($this->db->getRecordCount($result) == 1)
{
ココ→ $snippet= $this->snippetCache[$snippetName]= $row['snippet'];
ココ→ $properties= $this->snippetCache["{$snippetName}Props"]= $row['properties'];
}
・・・・・・・・・・・・・・・・・・・・・・・・・・・・・
}
1.0.6-r4にて以下の一行を挿入したら正常に動作しました。
コード: 全て選択
function runSnippet($snippetName, $params= array ())
{
if (isset ($this->snippetCache[$snippetName]))
・・・・・・・・・・・・・・・・・・・・・・・・・・・・・
if ($this->db->getRecordCount($result) == 1)
{
ココ→ $row = $this->db->getRow($result);
$snippet= $this->snippetCache[$snippetName]= $row['snippet'];
$properties= $this->snippetCache["{$snippetName}Props"]= $row['properties'];
}
・・・・・・・・・・・・・・・・・・・・・・・・・・・・・
}