diff options
author | Leandro Mangini Antunes <leandrowkz@gmail.com> | 2015-05-13 16:15:01 +0200 |
---|---|---|
committer | Leandro Mangini Antunes <leandrowkz@gmail.com> | 2015-05-13 16:15:01 +0200 |
commit | 4c08ea9c69aeb4acc1fbe47e873a11e82a6d5b79 (patch) | |
tree | 9fb902b85093a76951036382cb1f2986d4a9c76c /system/database/drivers/oci8 | |
parent | 7d19161c1d596c379e72c40daec290ce6f5f16b6 (diff) |
Fixed bug - using field_data() on Oracle databases
When you're using oracle databases and want to retrieve column information through the function field_data($table) you get the following notice:
- Notice: Undefined property: stdClass::$COLUMN_DEFAULT in system/database/drivers/oci8/oci8_driver.php on line 576;
This happens because the oci8 driver tries to access a property that does not exist on query used to get field information. Checking the code we see a small validation to set default value, but the variable $default is not used. So we fix this bug by simply changing:
$retval[$i]->default = $query[$i]->COLUMN_DEFAULT;
to
$retval[$i]->default = $default;
Bug fixed. No more notices and the properly value is set.
Diffstat (limited to 'system/database/drivers/oci8')
-rw-r--r-- | system/database/drivers/oci8/oci8_driver.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 4010995a1..b5cf26536 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -573,7 +573,7 @@ class CI_DB_oci8_driver extends CI_DB { { $default = ''; } - $retval[$i]->default = $query[$i]->COLUMN_DEFAULT; + $retval[$i]->default = $default; } return $retval; |