PauloV Posted April 14, 2014 Report Posted April 14, 2014 Hello 1- Describe the issue you're experiencing. Re: There is a bug on some areas of Blesta that only shows wen enabling Debug Mode. 2- Provide detailed steps necessary to reproduce the issue. Re: Wen enabling debug mode on blesta.php to Configure::errorReporting(-1); On, navigating in some settings like for exemple: If you have eNom Module Installed (or any outher registrar module) If you have a Domain Package added and active on one client ,and then on Blesta Admin, navigate to: Clients->Browse->{click on a client with an Active eNom or outher Registrar Domain}->{Click on Manage on an Active Domain}->Whois You will see that the page dosent parses and it sows the error: strlen() expects parameter 1 to be string, object given on line 54 in /{blesta instalation root path}/helpers/html/html.php I have reproduced this bug in several outher areas os Blesta 3.1.3 (dont remeber where , but is the same bug) 3- List any generated errors. (The "Oh Noes" error pages are very helpful.) Re: strlen() expects parameter 1 to be string, object given on line 54 in /{blesta instalation root path}/helpers/html/html.php 4- Include the URL the error occurred on, relative to the installation path, ie "/admin/login". Re: admin/clients/servicetab/1/2/tabWhois/ 6- Include your configuration settings, i.e. OS, version of Blesta, version of module/gateway/plugin if applicable, version of PHP & MySQL. Re: Blesta 3.1.3, PHP 5.3, MySQL 5.1.73 Flynnnan 1 Quote
Tyson Posted April 21, 2014 Report Posted April 21, 2014 I would need more info to duplicate this issue since I haven't run into it, and we always run with error reporting on. Quote
PauloV Posted April 22, 2014 Author Report Posted April 22, 2014 I have traced the problem and Im adding the fix (for now the bug is only on Registrars Modules eNom, InternetBS). The problem is wen no string is retuned, for exemple we have this code to populate Whois Fields: foreach ($whois_sections as $section) { if (isset($data->{$section})) { foreach ($data->{$section} as $name => $value) { $vars->{ucfirst($section)."_".$name} = $value; } } } and we add a simple string check (is_string) like this: foreach ($whois_sections as $section) { if (isset($data->{$section})) { foreach ($data->{$section} as $name => $value) { if (!is_string($value)){$value = "";} // check if is string $vars->{ucfirst($section)."_".$name} = $value; } } } The problem is wen is empty fields wen retriving external data Regards, PV Quote
Tyson Posted April 22, 2014 Report Posted April 22, 2014 So you're able to duplicate this with eNom, but only when the data returned from the API contains empty fields? The error you described suggests it is an object rather than a string, at least when passed to the HTML helper: strlen() expects parameter 1 to be string, object given on line 54 in /{blesta instalation root path}/helpers/html/html.php Could you provide a response and var_dump of the eNom data causing the issue? I'd like to know why a non-string value is given. Quote
PauloV Posted April 23, 2014 Author Report Posted April 23, 2014 So you're able to duplicate this with eNom, but only when the data returned from the API contains empty fields? The error you described suggests it is an object rather than a string, at least when passed to the HTML helper: Could you provide a response and var_dump of the eNom data causing the issue? I'd like to know why a non-string value is given. Hello I Have sent you a PM Regards, PV Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.