View Issue Details

IDProjectCategoryView StatusLast Update
0003090OXID eShop (all versions)4.07. Source code, Testpublic2012-12-10 13:44
ReporterHelmut L. Assigned To 
Status resolvedResolutionfixed 
Product Version4.5.0 revision 34568 
Fixed in Version4.5.9 revision 43186 
Summary0003090: fieldExists does not work with fields with lowercase letters
DescriptionIf you add a field to a table which contains lowercase letters and check in your code with oxdbmetadatahandler->fieldExists if it exists, you always get false as return value.
Steps To ReproduceAdd a field with lowercase letters to a table:
alter table oxcategories add test_field varchar(10);

Check with PHP if it exists:
$handler = oxNew('oxdbmetadatahandler');
$handler->fieldExists('test_field', 'oxcategories');
Additional InformationIn the fieldExists method strtoupper is always used on the $sFieldName parameter and thus does no more match with the field name retrieved from the db.

You should simply uppercase also the field names retrieved from the db:
$aTableFields = array_map('strtoupper', $aTableFields);
TagsNo tags attached.
PHP Versionany
Database Versionany


Linas Kukulskis

2012-03-20 17:02

reporter   ~0006048

added conversion to uppercase