Download & Extend

Access to a property for a non-object value

Project:Book access
Version:6.x-1.0-rc1
Component:Code
Category:bug report
Priority:normal
Assigned:Harry Slaughter
Status:closed (fixed)

Issue Summary

_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.

Comments

#1

Assigned to:Anonymous» Harry Slaughter

#2

Status:active» fixed

This code has been removed entirely

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here