I can't make bool variable equals true

I have a bool variable isDoorOpen, which I want to change after going through the trigger. But when I do it, the value of the variable doesn’t change. It is always false, but must became true

bool isDoorOpen;

void Update
{
    Debug.Log(isDoorOpen); // always show false
    if (isInsideDoorTrigger)
    {
        if (isDoorOpen)
            guiText.text = "'Space' to go to the city";
        else
            guiText.text = "The door is locked";

        if (Input.GetKeyDown(KeyCode.Space))
        {
            if (isDoorOpen)
                Application.LoadLevel(0);
            else
                lockedDoorAudio.Play();
        }
    }
}

void OnTriggerEnter(Collider other)
{
    if(other.tag == "Player" &&
       nameOfObjectWithTrigger == "MiddleCube")
    {
        gameObject.SetActive(false);
        isDoorOpen = !isDoorOpen;   // Here it must became true, but it still false
        // isDoorOpen = true - doesn't works too
    }
}    

Edit 1:

Function OnTriggetEnter works fine and with tags all fine too. Function change the value of isDoorOpen, but after exit function it became false again. Changing the order of the call operations did not help.

if(other.tag == "Player" &&
   nameOfObjectWithTrigger == "MiddleCube")
   {
        Debug.Log("isDoorOpen: " + isDoorOpen);  // false
        isDoorOpen = true;
        gameObject.SetActive(false);
        Debug.Log("isDoorOpen: " + isDoorOpen);   // true
    }

Maybe the problem is that this script is used by many object of the scene. I don’t make isDoorOpen equals false nowhere, only in the declaration in the beginning. Maybe for some objects with this script it’s local value became true and for some - not?

Of course it never shows up as true because when you do

gameObject.SetActive(false);

then your Update function isn’t called anymore, because your gameObject which holds your script is deactivated.
I’m not sure what you were trying to achieve by deactivating the gameObject.