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_oci/tests/bug_60665.phpt ('OCI 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: PDOStatement::execute(): SQLSTATE[HY000]: General error: 923 OCIStmtExecute: ORA-00923: FROM keyword not found where expected
 (/var/php_gcov/PHP_5_6/ext/pdo_oci/oci_statement.c:148) in /var/php_gcov/PHP_5_6/ext/pdo_oci/tests/bug_60665.php on line 7
bool(true)
bool(true)
bool(false)
bool(true)
bool(true)
bool(false)
bool(false)
bool(true)
===DONE===

Diff

# original source file: ext/pdo/tests/bug_60665.phpt
001+ Warning: PDOStatement::execute(): SQLSTATE[HY000]: General error: 923 OCIStmtExecute: ORA-00923: FROM keyword not found where expected
002+  (/var/php_gcov/PHP_5_6/ext/pdo_oci/oci_statement.c:148) in /var/php_gcov/PHP_5_6/ext/pdo_oci/tests/bug_60665.php on line 7
005+ bool(false)
006- bool(true)
007- bool(true)
008- bool(true)
008+ bool(false)
009+ bool(false)

 

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

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