Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing Flash\Session::has() returning always true #15353

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

Izopi4a
Copy link
Member

@Izopi4a Izopi4a commented Mar 30, 2021

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

Small description of change:

I am basically reverting the changes on Flash\Session::has() from this PR https://github.com/phalcon/cphalcon/pull/13994/files

I don't agree with the way funtion is changed, feels like just a bug

Thanks

@niden niden added 5.0 The issues we want to solve in the 5.0 release bug A bug report status: low Low labels Mar 30, 2021
@niden niden linked an issue Mar 30, 2021 that may be closed by this pull request
niden
niden previously approved these changes Mar 30, 2021
@niden niden dismissed their stale review March 30, 2021 16:35

Something is wrong with the tests - the code looks OK

@Izopi4a Izopi4a changed the title fixing Flash\Session::has() returning always true [WIP] fixing Flash\Session::has() returning always true Mar 30, 2021
@Izopi4a
Copy link
Member Author

Izopi4a commented Mar 30, 2021

i will check to see what is wrong, probably i broke something , changed the MR name to wip

@Izopi4a
Copy link
Member Author

Izopi4a commented Mar 30, 2021

ok, so if the declarion in zephir is as followed:

public function test(string test = null) {
    var_dump(test);
}

test(); // will output string ""

@Izopi4a Izopi4a changed the title [WIP] fixing Flash\Session::has() returning always true fixing Flash\Session::has() returning always true Mar 30, 2021
@Jeckerson
Copy link
Member

@Izopi4a Yep, just simulated in Zephir. For now we can specify var and check type if is string.

zephir-lang/zephir#2180

@niden
Copy link
Sponsor Member

niden commented Mar 31, 2021

Fixes #15353 (review)

@Izopi4a Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: low Low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Phalcon\Flash\Session::has return true when messages array is empty
3 participants