473,395 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Fatal error: Call to a member function on a non-object

Can anyone please guide me as to how to fix the below mentioned problem from php

...
Fatal error: Call to a member function on a non-object in /usr/local/apache2/htdocs/knowledgeTree-OSS/lib/browse/DocumentCollection.inc.php on line 414


/////////////////

The code is as follows...
Expand|Select|Wrap|Line Numbers
  1. function setSorting() {
  2.     387
  3.     388         $this->_sorted = true;
  4.     389
  5.     390         // defaults
  6.     391         $this->_sDocumentSortField = 'DM.name';
  7.     392         $this->_sFolderSortField = 'F.name';
  8.     393
  9.     394         foreach ($this->columns as $key => $oColumn) {
  10.     395             if ($oColumn->namespace == $this->sort_column) {
  11.     396                 $this->columns[$key]->setSortedOn(true);
  12.     397                 $this->columns[$key]->setSortDirection($this->sort_order);
  13.     398
  14.     399                 // get the join params from the object.
  15.     400                 $aFQ = $this->columns[$key]->addToFolderQuery();
  16.     401                 $aDQ = $this->columns[$key]->addToDocumentQuery();
  17.     402
  18.     403                 $this->_sFolderJoinClause = $aFQ[0];
  19.     404                 $this->_aFolderJoinParams = $aFQ[1];
  20.     405
  21.     406                 if ($aFQ[2]) { $this->_sFolderSortField = $aFQ[2]; }
  22.     407                 $this->_sDocumentJoinClause = $aDQ[0];
  23.     408                 $this->_aDocumentJoinParams = $aDQ[1];
  24.     409
  25.     410                 if ($aDQ[2]) {
  26.     411                     $this->_sDocumentSortField = $aDQ[2]; }
  27.     412                 } else {
  28.     413                          /*   $oColumn->setSortedOn(false);*/
  29.     414                                 $oColumn->setSortedOn(false);
  30.     415                 }
  31.     416         }
  32.  
The problem is at line 414
Jul 23 '07 #1
1 1873
code green
1,726 Expert 1GB
You need to pass this object into your function
$oColumn
Jul 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Daniel Hansen | last post by:
I am getting a "Fatal error: Call to undefined function: imagecreatefromjpeg() in..." error in one of my scripts, and after doing a bit of searching on the 'net I found various messages relating to...
3
by: PeterF | last post by:
Hello, what is wrong here? the purpose is to create an array of objects and then interate over it, calling some method from all of them. I get just the following at the marked line ("// FATAL...
4
by: gc | last post by:
I'm a PHP and MySQL newbie. I have a feeling a lot of you may have seen this before. I'm teaching myself PHP/MySQL and trying to setup a guestbook. I'm running latest versions of Apache, PHP and...
8
by: Tim Tyler | last post by:
I'm getting fatal errors when executing code - and my error handler is failing to trap them - so I get no stack backtrace :-( The error I am getting is: "Fatal error: Call to a member function...
2
by: dmitry.freitor | last post by:
Why would someone call a non-static provate member function from another non-static member function of the same class via the this pointer? Thanks. DF
7
by: Ook | last post by:
What am I doing wrong? This code gives a compile error: 'SortedList<T>::insert' : illegal call of non-static member function. I've tried several variations of this, but keep getting the same error....
4
by: Jesper Stocholm | last post by:
I have a recursive function that I would like to do a lot of recursive calls (preferebly 2^20 in total) The function is called as (with maxi = e.g. 100000) DoRecursion(0,maxi,bseed,sha); ...
6
by: Bill Rubin | last post by:
The following code snippet shows that VC++ 7.1 correctly compiles a static member function invocation from an Unrelated class, since this static member function is public. I expected to compile the...
12
by: mast2as | last post by:
Hi everyone... I have a TExceptionHandler class that is uses in the code to thow exceptions. Whenever an exception is thrown the TExceptionHander constructor takes an error code (int) as an...
2
by: Ian825 | last post by:
I need help writing a function for a program that is based upon the various operations of a matrix and I keep getting a "non-aggregate type" error. My guess is that I need to dereference my...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.