title: is_object not returning expected result php
body: <p>I'm working on a script where I can check permissions and stuff, and I stumbled across something odd.</p>
  
  <p>My permission script can check systems and functions and see if the user is allowed to use m.</p>
  
  <p>I'll explain with some code:</p>
  
  <pre><code>if(permission::check('factbounce', 'magklik')){
  echo ' Yep good ';
  } else {    
  echo 'Nope not good';
  }
  </code></pre>
  
  <p>Here I have a system factbounce and a function magklik, now inside the permission class:</p>
  
  <pre><code>public static function check($systemCode, $functionCode = null ){
          $instance = self::get();
  
          if($instance-&gt;checkSystem($systemCode)){            
              if(is_null($functionCode))
                  return true;
  
              if(!$instance-&gt;checkSystemFunction($functionCode))
                  return false;
  
              return true;
  
          }   
  
          return false;
      }
  </code></pre>
  
  <p>This piece of code of will trigger <code>checkSystemFunction</code>, and will check on magklik:</p>
  
  <pre><code>private function checkSystemFunction ( $functionCode ){
  
      if(!self::$oSystemFunction)
          self::$oSystemFunction = org_system_function::getByCode($functionCode);
  
      if(!is_object(self::$oSystemFunction));
          echo 'No Object';
  
      echo '&lt;pre&gt;'.print_r(self::$oSystemFunction, true).'&lt;/pre&gt;';
  
      if(!self::$oSystemPermission-&gt;checkFunctionPermission(self::$oMedewerker, self::$oSystemFunction))
          return false;
  
      return true;        
  
  }   
  </code></pre>
  
  <p>The output of the code is this:</p>
  
  <pre><code>No Object
  org_system_function Object
  (
      [primaryKey] =&gt; org_system_function_id
      [table] =&gt; org_system_function
      [arAssoc] =&gt; Array
          (
              [function_id] =&gt; 1
              [name] =&gt; May click around
              [code] =&gt; magklik
              [description] =&gt; do what you want
          )
  
  )
  Yep good
  </code></pre>
  
  <p>I don't understand why it says no object, clearly when I print it it's an object.</p>