Skip to content

Commit

Permalink
file_add(): Oracle BLOB contents must not be quoted
Browse files Browse the repository at this point in the history
Using a quoted hex string causes error 'ORA-01465: invalid hex number
for the query' when inserting the new record.

Follow-up fix for issue #13227
  • Loading branch information
dregad committed Oct 16, 2013
1 parent 179916f commit 02bbb99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/database_api.php
Expand Up @@ -789,7 +789,7 @@ function db_prepare_binary_string( $p_string ) {
break;
case 'oci8':
$content = unpack( "H*hex", $p_string );
return '\'' . $content['hex'] . '\'';
return $content['hex'];
default:
return $p_string;
break;
Expand Down
2 changes: 1 addition & 1 deletion core/file_api.php
Expand Up @@ -812,7 +812,7 @@ function file_add( $p_bug_id, $p_file, $p_table = 'bug', $p_title = '', $p_desc

chmod( $t_disk_file_name, config_get( 'attachments_file_permissions' ) );

$c_content = "''";
$c_content = '';
} else {
trigger_error( ERROR_FILE_DUPLICATE, ERROR );
}
Expand Down

0 comments on commit 02bbb99

Please sign in to comment.