Access to a property for a non-object value
kiamlaluno - January 20, 2009 - 21:40
| Project: | Book access |
| Version: | 6.x-1.0-rc1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Harry Slaughter |
| Status: | closed |
Jump to:
Description
_book_access_get_book_nid() has the following code:
<?php
function _book_access_get_book_nid($nid) {
$result = db_query("SELECT bid FROM {book} WHERE nid = %d", $nid);
return db_fetch_object($result)->bid;
}
?>As db_fetch_object() can return FALSE, the return line tries to access a property for a value that is not an object.

#1
#2
This code has been removed entirely
#3
Automatically closed -- issue fixed for 2 weeks with no activity.