Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Contents Overview 3.3 getDir()
#1
When I go into the Admin-Tools and select Contents Overview, for each of the documents in the folder, the following errors appear...

Notice: Undefined property: LetoDMS_Core_Document::$_document in C:\wamp\www\LetoDMS\Core\inc.ClassDocument.php on line 161

Notice: Trying to get property of non-object in C:\wamp\www\LetoDMS\Core\inc.ClassDocument.php on line 161

Notice: Trying to get property of non-object in C:\wamp\www\LetoDMS\Core\inc.ClassDocument.php on line 161

The errors seem to repeat 6 times for each document. Following the messages, the document is shown along with the owner, and size information.

The function call at the bottom of each stack is the same in all of them:
LetoDMS_Core_Document->getDir( ) ..\out.Statistic.php:127
Reply
#2
I think I might have found the problem, but I am hoping that somebody more familiar with the code can confirm my fix or not.

Line 161 and 162 in inc.ClassDocument.php is currently:
if($this->_document->_dms->maxDirID) {
$dirid = (int) (($this->_id - 1) / $this->_document->_dms->maxDirID) + 1;

I changed the lines to read:

if($this->_dms->maxDirID) {
$dirid = (int) (($this->_id - 1) / $this->_dms->maxDirID) + 1;

My thought was that the maxDirID was not an inherited properly of a document, rather the DMS system as a whole. Making this change did get rid of the error messages.

Was I correct, or just lucky?

Thanks in advance.
Reply
#3
(03-22-2012, 03:43 AM)dhandler Wrote: I think I might have found the problem, but I am hoping that somebody more familiar with the code can confirm my fix or not.

Line 161 and 162 in inc.ClassDocument.php is currently:
if($this->_document->_dms->maxDirID) {
$dirid = (int) (($this->_id - 1) / $this->_document->_dms->maxDirID) + 1;

I changed the lines to read:

if($this->_dms->maxDirID) {
$dirid = (int) (($this->_id - 1) / $this->_dms->maxDirID) + 1;

My thought was that the maxDirID was not an inherited properly of a document, rather the DMS system as a whole. Making this change did get rid of the error messages.

Was I correct, or just lucky?

Thanks in advance.

It is a bug and a pretty obvious one. I wonder why this hasn't popped up before.

Thanks for reporting.

Uwe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)