Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 837455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:08:36+00:00 2026-05-15T05:08:36+00:00

I am working on a Zend project and it has been well over 12

  • 0

I am working on a Zend project and it has been well over 12 months since I touched Zend, I am getting an error on one of my functions, and I cannot work out why, I think it may be down to the site being originally built in an earlier version of PHP (5.2) and I am now running 5.3.

The function looks like this,

public function addDebug($mixedObject, $title = "")
    {
        $debugObject = new stdClass();
        $debugObject->title       = $title;   
        $debugObject->type        = gettype($mixedObject);
        $debugObject->className   = (!get_class($mixedObject)) ? "" : gettype($mixedObject);<-- Line error is complaining about -->
        $debugObject->mixedObject = $mixedObject; 
        array_push($this->debugArr, $debugObject);
    }

The error message is as follows,

get_class() expects parameter 1 to be object, array given in /server/app/lib/View.php on line 449

Any advice on the issue would be good.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:08:37+00:00Added an answer on May 15, 2026 at 5:08 am

    The get_class function requires the parameter to be an object. The error says that $mixedObject is an array.

    It might help to check if $mixedObject is an object first:

    $debugObject->className = is_object($mixedObject) ? get_class($mixedObject) : '';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on implementing Zend Framework within an existing project that has 2
I have been working with Zend for a few months now and am at
I have been working with Zend Framework for a few months now. I have
I'm working on a zend project which has functionality based on user logged minutes.
I'm working on a project using Zend Framework, which I initially chose since I
I am working on one project in zend framework 1.12. for generating decorators I
I am just getting started with a big Zend Framework project. One thing confuses
I am working on implementing Zend Framework within an existing project that has a
I am working on a project with zend framework and i need your advise
I'm working on a project that is currently using the Zend Framework 1.7.6, however

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.