Giter Club home page Giter Club logo

Comments (7)

scottchiefbaker avatar scottchiefbaker commented on August 17, 2024

How are you calling Krumo that you're getting this output?

from krumo.

pienter-tech avatar pienter-tech commented on August 17, 2024

I tried both the global function and the object based method: I only receive the error when using the global function.

from krumo.

scottchiefbaker avatar scottchiefbaker commented on August 17, 2024

What were you trying to dump? Line 532 is a pretty weird line to die on. Line 532 is checking if you've disabled Krumo globally.

What version of PHP are you running?

from krumo.

pienter-tech avatar pienter-tech commented on August 17, 2024

Hey sorry for my late reply (had some time off).
We're running php 5.6.
I'm dumping get_defined_vars() not sure if that might be a problem?
Krumo doesn't die either, if we weren't running raygun I would have never noticed anything.
I just wanted to let you know that raygun keeps throwing these errors at me.

from krumo.

pienter-tech avatar pienter-tech commented on August 17, 2024

I'm guessing raygun ignores the @ error operator (didn't just found out about these).
I'll try with raygun, they should ignore these errors.

from krumo.

mmucklo avatar mmucklo commented on August 17, 2024

from krumo.

kktsvetkov avatar kktsvetkov commented on August 17, 2024

@scottchiefbaker + @mmucklo Perhaps the code can be refactored not to have the silence operator at all? Right now it is

            if (in_array($function, array("krumo","k","kd")) || (strToLower(@$d['class']) == 'krumo') || (is_callable($callback) && call_user_func($callback, $d))) {
                break;
            }

Let's break it up into 3 separate statements with an extra check if the "class" element is not empty, like this:

            if ( in_array($function, array("krumo", "k", "kd")) ) {
                break; // krumo alias function
            }
            if (!empty($d['class']) && ('krumo' == strToLower($d['class']))  ) {
                break; // krumo class method
            }
            if ( is_callable($callback) && call_user_func($callback, $d) ) {
                break; // callback
            }

It's more readable this way with each case for exiting the loop clearly defined, AND with the extra check that $d['class'] is not empty.

from krumo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.