Coder Social home page Coder Social logo

Comments (8)

REJack avatar REJack commented on May 29, 2024

not really, if $this->errors is empty it returns not FALSE it returns NULL so print_r(count($this->infos)); will return 0 and not 1

i've tested it with my Linux VPS and my Windows XAMPP same result.

from codeigniter-aauth.

cekdahl avatar cekdahl commented on May 29, 2024

I'm not sure what you did wrong but if you evaluate count(FALSE) you will see that this is in fact 1, and this is documented behavior. If you look in the session library you will see that flashdata is implemented using userdata, which is implemented like this:

function userdata($item)
{
    return ( ! isset($this->userdata[$item])) ? FALSE : $this->userdata[$item];
}

This means that if the item doesn't exist it will return FALSE, not NULL.

This problem arose from me using this library, so I had to trace the bug, i.e. I have also tested my conclusion.

from codeigniter-aauth.

REJack avatar REJack commented on May 29, 2024

we are both right
you tested it on CI 2.2
i tested it on CI 3

from codeigniter-aauth.

cekdahl avatar cekdahl commented on May 29, 2024

I guess you are behind the updates that cause the library to not work on CodeIgniter 2.x. I am of the opinion that we are not both right, and that @emreakay should not have accepted your pull request until it was made compatible with 2.x. It is clearly stated in the description of this library that it is for Codeigniter 2.x.

from codeigniter-aauth.

cekdahl avatar cekdahl commented on May 29, 2024

And, just to make sure I'm being understood, this is not legalism. I'm not just saying these things to be right. The problem is that when people such as I search for an authorization library for Codeigniter 2.x we're directed here, and start writing code in Codeigniter 2.x with this library thinking that it will work. But then when we run the code it turns out that it doesn't, and so we have to spend time to figure it out. I'm not saying the maintainers of this library cannot possibly drop support for 2.x - I'm just saying that it's evil to write that it's for 2.x when it's not compatible with 2.x.

from codeigniter-aauth.

REJack avatar REJack commented on May 29, 2024

@cekdahl i understood your opinion, can you close this issue? emre merged your PR and changed the Info Text to 2.x and 3.x

from codeigniter-aauth.

cekdahl avatar cekdahl commented on May 29, 2024

@REJack I forgot about that. It's now done.

from codeigniter-aauth.

REJack avatar REJack commented on May 29, 2024

thx 😃

from codeigniter-aauth.

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.