PHP  
 PHP_5_6
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/pdo_firebird/tests/bug_60665.phpt ('FIREBIRD PDO Common: Bug #60665 (call to empty() on NULL result using PDO::FETCH_LAZY returns false)')

Script

1: <?php
2:
if (getenv('REDIR_TEST_DIR') === falseputenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
3: require_once 
getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
4:
$db PDOTest::factory();
5:
6:
$statement $db->prepare("SELECT NULL AS null_value, 0 AS zero, 1 AS one");
7:
$statement->execute();
8:
$row $statement->fetch(PDO::FETCH_LAZY);
9:
var_dump(
10:     empty(
$row->null_value),
11:     empty(
$row->zero),
12:     !empty(
$row->one),
13:     empty(
$row->missing),
14:     !isset(
$row->null_value),
15:     isset(
$row->zero),
16:     isset(
$row->one),
17:     !isset(
$row->missing)
18: );
19:
?>
20:
===DONE===
21:

Expected

bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
===DONE===

Output

Warning: PDO::prepare(): SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Unexpected end of command - line 1, column 44  in /var/php_gcov/PHP_5_6/ext/pdo_firebird/tests/bug_60665.php on line 6

Fatal error: Call to a member function execute() on boolean in /var/php_gcov/PHP_5_6/ext/pdo_firebird/tests/bug_60665.php on line 7

Diff

# original source file: ext/pdo/tests/bug_60665.phpt
001+ Warning: PDO::prepare(): SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Unexpected end of command - line 1, column 44  in /var/php_gcov/PHP_5_6/ext/pdo_firebird/tests/bug_60665.php on line 6
002+ 
003+ Fatal error: Call to a member function execute() on boolean in /var/php_gcov/PHP_5_6/ext/pdo_firebird/tests/bug_60665.php on line 7
001- bool(true)
002- bool(true)
003- bool(true)
004- bool(true)
005- bool(true)
006- bool(true)
007- bool(true)
008- bool(true)
009- ===DONE===

 

Generated at Mon, 27 Nov 2017 05:04:32 +0000 (16 days ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.