if condition changed by its content

user3175393

I encountered relay interesting problem.

I have this condition in external file which is called and after process code redirects to page set via BACKLINK post parameter like this.

if(isset($_POST['secureLogout'])) 
{
    $_POST['backlink'] = '/';
    session_destroy();
    System::WriteLog('Session has been destroyed');
} 

and even I don't post secureLogout parameter it still trigger, so I tried to var_dump POST variables, there is no secureLogout parameter.

so then I tried put my POST inside condition with exit to see what is in my post..

if(isset($_POST['secureLogout'])) 
{
    var_dump($_POST); exit();

    $_POST['backlink'] = '/';
    session_destroy();
    System::WriteLog('Session has been destroyed');
} 

and NOW magic happens It does not trigger the code continue and everything works fine, but i cant logout now directly cause of exit before session destroy.

So basically how is it even possible that content inside IF has any effect on condition??

It is completely UN-logical and I lost my patience, I tried change post names, conditions but result is same.

If there is exit inside condition, condition is false, if there is no exit condition is true.

EDIT

I changed if condition to $_POST['secureLogout'] == 'secureLogout' problem still remained then i changed condition to

$_POST['secureLogout'] == 'secureLogout123'

which has to be false everytime and it is session is not destroyed, so I put exit inside again and changed condition back

$_POST['secureLogout'] == 'secureLogout'

with exit, condition does not tirgger so $_POST secureLogout parameter is either different or is not set

I removed exit and session been destroied...

user2826311

Check the amount of parameters available to be post in phpini. Maybe you are trying to post too many variables which overflow the capacity and cause the script to crash.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

What is the proper way to animate block resizing after its content changed

From Dev

Using ContextAPI doesn't re-render its consumer, but content is changed. Why?

From Dev

How to know which tableview cell's text field is changed its content

From Dev

Has Directory Content Changed?

From Dev

Event for ckeditor content changed

From Dev

Indication whether the content is changed

From Dev

Copy file with changed content

From Dev

know if a boolean changed its value

From Dev

Git alias changed on its own

From Dev

targeting an element by its content and the content of its ancestors

From Dev

Content of SwingNode not garbage collected when content changed

From Dev

Content of SwingNode not garbage collected when content changed

From Dev

TextView will not center its content

From Dev

delete a folder and its content

From Dev

Relativelayout not wrapping its content

From Dev

Summernote will not edit its content

From Dev

Cloning an array with its content

From Dev

TextView will not center its content

From Dev

Get cell by its content

From Dev

Aggregate vector by its content

From Dev

condition on content of tabpanel shiny

From Dev

Notification when GridViewColumn has its ActualWidth changed

From Dev

How to stop cellForItemAtIndexPath running if its datasource changed

From Dev

How to stop cellForItemAtIndexPath running if its datasource changed

From Dev

Terminal has changed its default folder to start at

From Dev

Div resized when its font size changed

From Dev

jquery checking select input if changed with condition

From Dev

Exclude an item and its content elements

From Java

Get the size of a directory (not its content)

Related Related

HotTag

Archive