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 4084076
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:23:38+00:00 2026-05-20T18:23:38+00:00

After having written a few helper classes in magento, now i have this problem,

  • 0

After having written a few helper classes in magento, now i have this problem, i’m getting this error

Fatal error: Class ‘Zend_Log’ not found in app\code\local\Uhma\Program\Helper\Data.php on line 33

in line 33 i have this

function WBSAPI_OnceProbe ()
{
    return ( $this->WBSAPI_CurlCall ( "once?action=probe" , &$result) );//LINE 33
}

the function i’m calling with the return is this

function WBSAPI_CurlCall ( $service , &$result=null )
{
    try {
        $s = curl_init();
            curl_setopt($s,CURLOPT_URL,MYWBSAPIURL.$service);
            curl_setopt($s,CURLOPT_POST,false);
            curl_setopt($s, CURLOPT_RETURNTRANSFER, 1);
            $output = curl_exec($s);
            curl_close($s);
        $result = json_decode ( $output , TRUE );
        if (!is_array($result)) return (false);
        if (!key_exists('status',$result)) return (false);
        if ($result['status'] != 0) return (false);

        return ( true );
    } catch ( Exception $e ) {
        return ( false );
    }
} 

i’ve been in google for a while, some say that it is a function in my helper that is overwriting a function from magento’s, i put WBSAPI_ to all my functions at the begining, so, it can’t be the cause, i keep getting the same error and i dont know what else to try, need some help here

if it can help, i have some other definitioNs in my file, somthing like this

define ('MYWBSAPIURL','wbsapi.withings.net/');
define ('MYAPIURL','scalews.withings.net/cgi-bin/');

define ('pound',0.453592);
define ('inch', 0.0254);
class Uhma_Program_Helper_Data extends Mage_Core_Helper_Abstract{
    //CLASS CONTENT
}

thanks

  • 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-20T18:23:38+00:00Added an answer on May 20, 2026 at 6:23 pm

    The reason you’re getting that error is

    1. You have PHP code which produces warnings
    2. Magento runs with error handling cranked up to 11
    3. Magento tries to log the error, and can’t find the class.

    The code in question is

    $this->WBSAPI_CurlCall ( "once?action=probe" , &$result) );
    

    You’re passing a variable by reference at call time (&$result). That’s been depreciated in modern versions of PHP. Without custom error handling, you’ll get an warning something like

    PHP Warning:  Call-time pass-by-reference has been deprecated;
    

    So, pass in $result without the &. Given than your method has the paramater declared in its prototype as a pass-by-reference, doing so won’t functionally change your code. That should take care of your immediate problem.

    The larger reason Magento’s giving you this error is its custom error handler.

    #File: app/code/core/Mage/Core/functions.php
    function mageCoreErrorHandler($errno, $errstr, $errfile, $errline)
    {
        ...
        if (Mage::getIsDeveloperMode()) {
            throw new Exception($errorMessage);
        } else {
            Mage::log($errorMessage, Zend_Log::ERR);
        }
    }
    

    Since you’re not working in developer mode, Magento tries to log an error using the constant Zend_Log as its type. The problem is (or appears to be) that if your error happens too soon in the Magento bootstrap/dispatch process, Zend_Log hasn’t been loaded yet and the autoloader doesn’t take care of it. That’s why you’re getting your error.

    You should fix your code not to use call-time pass by reference (remove &$result from your calling code, but not from the function definitions). If you don’t want to do that you could try including lib/Zend/Log.php earlier yourself. I think that’s a bad idea so I’ll leave the hows as an exercise for the reader.

    Also, for those not familiar with the term “call time pass by reference”, it means indicating a variable should be passed by reference when you call a method.

    foo(&$bar);
    

    Passing a reference to a function

    $bar = &baz;
    foo($bar);
    

    Or declaring a paramater in a method’s prototype indicating it should be passed by reference

    public function applyInApp(&$content)
    {
    }
    

    is still legal PHP code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a list-like template class sll (Single Linked List). Now, I am
I'm having this weird problem where other instances of my jQuery plugin are getting
After having this issue on our websites over secure SSL connections for Office file
After having my last question answered , I have never see the preventDefault(); function
After having a couple of issues getting DQS installed , it appears to be
After having worked in MVC for a few months, I'm back in a previously
After having converted a messed up XML using regex, I now need to change
I encountered a problem after having more than one texture in my engine. My
Having written couple of little apps I realized now - reading through the activity
Surprisingly, after having done a lot of queries without problem. I've run into the

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.