View Issue Details

IDProjectCategoryView StatusLast Update
0006065OXID eShop (all versions)4.07. Source code, Testpublic2024-01-17 13:57
Reporters.krenz Assigned To 
PrioritylowSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version4.8.1 / 5.1.1 
Fixed in Version6.0.0-beta.1 
Summary0006065: Method excepts a String as first argument, but gets an array.
DescriptionI used Xdebug with and activated the "scream" configuration. If the Smarty modifier "oxaddparams" is used warnings will be generated. This prevents the frames from being loaded correctly.

I spent some time to find out what's going wrong.
The configuration variables "aLanguageURLs" and "aLanguageSSLURLs" are sent to the method oxUtilsUrl::_addHosts(). These variables are arrays NOT strings, as expected from "_addHosts". Further "_addHosts" does NOT check if it gets a string in the "sUrl" argument, it simply suppresses ANY warnings.
Additional InformationCode snippets where this bug occur:

core/oxutilsurl.php (inside method _getHosts)
293: // language url
294: $this->_addHost( $oConfig->getConfigParam( 'aLanguageURLs' ), $this->_aHosts );
295: $this->_addHost( $oConfig->getConfigParam( 'aLanguageSSLURLs' ), $this->_aHosts );

core/oxutilsurl.php (inside method _addHost)
271: if ( $sUrl && ( $sHost = @parse_url( $sUrl, PHP_URL_HOST ) ) ) { // <-- PHP warning will be generated if "xdebug.scream = 1" (or something similar) and "$sUrl" is an array!
TagsNo tags attached.
ThemeAll
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Relationships

related to 0005905 resolvedvilma_liorensaityte Missing checks for SSL, mallshop and language-hosts 

Activities

SvenBrunk

2024-01-17 13:57

administrator   ~0016142

Fixed together with 0005905