yiisoft/yii — Issue #475: Variable is NULL but has a class-name.
Author: dsoprea
Created: 2012-03-08 19:01:04+00:00
State: open

A weird anomaly. I accessed a component on CWebApplication that shouldn't be defined, and I get a value back. gettype() reports that the value is NULL, but get_class() returns "MainstreetMap" (one of our models... I'm in it when I experience this).

gettype():

$cache = Yii::app()->cache;
var_dump(gettype($cache));die();

Returns:

string(4) "NULL"

get_class():

$cache = Yii::app()->cache;
var_dump(get_class($cache));die();

Returns:

string(13) "MainstreetMap"

Thoughts?

Dustin Oprea