Ticket #572: database.patch
| File database.patch, 4.4 kB (added by charlie, 3 months ago) |
|---|
-
system/libraries/drivers/Database/Mysqli.php
226 226 // autoloading is disabled to save a lot of stupid overhead. 227 227 if ($this->fetch_type == 'fetch_object') 228 228 { 229 $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass';229 $this->return_type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 230 230 } 231 231 else 232 232 { … … 257 257 258 258 // NOTE - The class set by $type must be defined before fetching the result, 259 259 // autoloading is disabled to save a lot of stupid overhead. 260 $type = class_exists($type, FALSE) ? $type : 'stdClass';260 $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 261 261 } 262 262 else 263 263 { … … 271 271 272 272 if ($fetch == 'fetch_object') 273 273 { 274 $type = class_exists($type, FALSE) ? $type : 'stdClass';274 $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 275 275 } 276 276 } 277 277 -
system/libraries/drivers/Database/Mssql.php
392 392 // autoloading is disabled to save a lot of stupid overhead. 393 393 if ($this->fetch_type == 'mssql_fetch_object') 394 394 { 395 $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass';395 $this->return_type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 396 396 } 397 397 else 398 398 { … … 423 423 424 424 // NOTE - The class set by $type must be defined before fetching the result, 425 425 // autoloading is disabled to save a lot of stupid overhead. 426 $type = class_exists($type, FALSE) ? $type : 'stdClass';426 $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 427 427 } 428 428 else 429 429 { … … 437 437 438 438 if ($fetch == 'mssql_fetch_object') 439 439 { 440 $type = class_exists($type, FALSE) ? $type : 'stdClass';440 $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 441 441 } 442 442 } 443 443 -
system/libraries/drivers/Database/Pdosqlite.php
385 385 386 386 if ($this->fetch_type == PDO::FETCH_OBJ) 387 387 { 388 $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass';388 $this->return_type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 389 389 } 390 390 else 391 391 { … … 415 415 416 416 // NOTE - The class set by $type must be defined before fetching the result, 417 417 // autoloading is disabled to save a lot of stupid overhead. 418 $type = class_exists($type, FALSE) ? $type : 'stdClass';418 $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 419 419 } 420 420 else 421 421 { … … 429 429 430 430 if ($fetch == PDO::FETCH_OBJ) 431 431 { 432 $type = class_exists($type, FALSE) ? $type : 'stdClass';432 $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 433 433 } 434 434 } 435 435 try -
system/libraries/drivers/Database/Pgsql.php
395 395 // autoloading is disabled to save a lot of stupid overhead. 396 396 if ($this->fetch_type == 'pg_fetch_object') 397 397 { 398 $this->return_type = class_exists($type, FALSE) ? $type : 'stdClass';398 $this->return_type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 399 399 } 400 400 else 401 401 { … … 426 426 427 427 // NOTE - The class set by $type must be defined before fetching the result, 428 428 // autoloading is disabled to save a lot of stupid overhead. 429 $type = class_exists($type, FALSE) ? $type : 'stdClass';429 $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 430 430 } 431 431 else 432 432 { … … 440 440 441 441 if ($fetch == 'pg_fetch_object') 442 442 { 443 $type = class_exists($type, FALSE) ? $type : 'stdClass';443 $type = (is_string($type) AND Kohana::auto_load($type)) ? $type : 'stdClass'; 444 444 } 445 445 } 446 446
