473,394 Members | 1,671 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,394 software developers and data experts.

GetIdentity Function for PHP giving Fatal Error

Hi All,

I'm having a bit of a dumb moment. I cannot get this function to work, so any help would be appreciated.

Thanks

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.      $authorID = Zend_Auth::getInstance()-getIdentity()-author_id;
  3. $posts = new Application_Model_Posts();
  4. $numPosts = $posts->getPostsByAuthor($authorID);
  5. ?> <div><?php echo $numPosts; ?> Posts</div>
Jul 24 '14 #1
3 1204
Dormilich
8,658 Expert Mod 8TB
the property access operator is ->, not -
Jul 25 '14 #2
Hiya,

I've now got the following error:

Expand|Select|Wrap|Line Numbers
  1. Notice: Use of undefined constant authorid - assumed 'authorid' in /html/addons/altcover01/custom_layout/partial/cover.phtml on line 359
  2.  
  3. Notice: Object of class stdClass could not be converted to int in /html/addons/altcover01/custom_layout/partial/cover.phtml on line 359
  4. Array Posts
Any clue?
Jul 25 '14 #3
Dormilich
8,658 Expert Mod 8TB
you have this error twice. I thought you’d notice that…
Jul 25 '14 #4

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

Similar topics

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: Praveen Chandra | last post by:
Hi, I am trying to build a static library, while building the library i am getting the following error: fatal error C1189: #error : "No sstream/strstream implementation" Following is the...
0
by: bennett | last post by:
I posted in the WordPress tech support forum asking how to create a "sidebar" page that showed the last 3 posts from my blog, and someone replied telling me to create a php page with a certain...
2
by: lwo3108 | last post by:
Hi I am using PHP 4.3.1 and i have written a little code for purpose of CAPTCHA Image. i am running this code locally on localhost using IIS 5.0. When i open the code page, i get an fatal...
1
by: santrooper | last post by:
Hello all, I am trying to unpack big wav file (more than 10 mb), because i want to generate Visualization of an wav file, for smaller files (less than 2 mb) it works fine, but for bigger files it...
3
by: sachinv1821 | last post by:
hi , i am Getting this Error fatal error C1189: #error : "eh.h is only for C++!" my Problem is i am Having C++ librabry and Appropriate .h file i want to Access Them is .c File Files..... to Be...
3
by: charmeda103 | last post by:
I keep getting errors and i looked relooked I cant seem to see what wrong. from my code can see u where the errors are coming from. here are the error messages: 1.warning C4101: 'size' :...
1
by: kinggzo | last post by:
I tried to instal joomla plug-in Jvideo to play my video in my web site instead off using Embedded youtube code and am getting this ERROR: Fatal error: Call to a member function registerEvent() on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.