Undefined Variable - bind_result

When using mysqli_stmt->bind_result, the variable(s) used are regarded as undefined. For instance,

$stmt = $this->con->prepare("select count(*) from table1 where col1 = 1")
$stmt->execute();
$stmt->bind_result($count);
$stmt->fetch();
$stmt->close();


if ($count > = 0) { ... }


The $count variable is regarded as an undefined variable. Obviously, adding an initializer somewhere above the statement fixes the issue, but it's not required by the language and shouldn't be required by the development environment.

Thanks.

Jason

3 comments
Comment actions Permalink

Hello Jason,

Can you please file a bug report at http://youtrack.jetbrains.net?

Thanks,
Kirill

0
Comment actions Permalink

Jason, unfortunately PhpStrom doesn't have full support for all php extensions. Please vote: http://youtrack.jetbrains.net/issue/WI-174

0
Comment actions Permalink

Will do, Kirill. Thanks.

Jason

0

Please sign in to leave a comment.