Cassandra异常错误 - 谁知道解决方案?

时间:2014-09-15 21:42:03

标签: php cassandra cassandra-2.0

我在我的开发中使用php evseevnn / php-cassandra-binary 。上次我总是异常:

<h4>A PHP Error was encountered</h4>

<p>Severity: User Notice</p>
<p>Message:  Reading while at end of stream</p>
<p>Filename: Response/Rows.php</p>
<p>Line Number: 65</p>

我在第65行看到了ar文件 Response / Rows.php 。 有这里:

  public function current() {
            if (!isset($this->rows[$this->current])) {
                throw new \OutOfRangeException('Invalid index');
            }
            $row = $this->rows[$this->current];
            for ($i = 0; $i < $this->columnCount; ++$i) {
                try {
                    $data = new DataStream($this->rows[$this->current][$this->columns[$i]['name']]);
                    $row[$this->columns[$i]['name']] = $data->readByType($this->columns[$i]['type']);
                } catch (\Exception $e) {
                    trigger_error($e->getMessage()); // Line 65
                    $row[$this->columns[$i]['name']] = null;
                }
            }
            return $row;
        }

你能帮我解决一下这个错误并理解它为什么会发生吗?也许在Github向开发人员写一个问题? https://github.com/evseevnn/php-cassandra-binary

2 个答案:

答案 0 :(得分:2)

答案 1 :(得分:1)

调用粘贴函数时,

看起来像$ this-&gt; columnCount设置不正确。