Void function result used

Hi,

I'm new to PHPstorm but I noted, that nearly all my "mysqli_..." statements generate the "Void function result used" error (Please check the attached screenshot). As far as I understand, the error indicates in this case that the mysqli_num_rows()" statement has to be used without a rreturn value. Those mysqli-Statements DO return a value like you can see under: http://php.net/manual/en/mysqli-result.num-rows.php. If I disable this option in the settings panel, I will disable it for everything and not only for my mysql-Statements. What can I do?

Thanks a lot for your help and have a nicer day!



Attachment(s):
mysqli_error.png
2 comments
Comment actions Permalink

Hi Patrick,

It's an error in stub files in PhpStorm (all docs / code completion etc is taken from such files) For example, mysqli_num_rows is defined in PhpStorm_INSTALL\plugins\php\lib\php.jar!\com\jetbrains\php\lang\psi\stubs\data\mysqli.php -- you can go there and see yourself by Ctrl+Click on such function.

I think they should be aware of such issue .. but if not -- you can create new ticket on Issue Tracker -- http://youtrack.jetbrains.com/issues/WI

0
Comment actions Permalink

Hi,

Thanks a lot for answering. I will disable this option and then everything is ok.

It's necessary that the developers know about this so they can correct it for a future version of your great IDE...

Best regards and have a nice day !

0

Please sign in to leave a comment.