JoomJunk / shoutbox

JJ Shoutbox module for Joomla! CMS. The most highly rated shoutbox on JED.
https://joomjunk.co.uk
6 stars 11 forks source link

Undefined variable in helper.php #220

Closed betteryouthanme closed 8 years ago

betteryouthanme commented 8 years ago

PHP error log gives following error: PHP Notice: : href in C:\inetpub\wwwroot\www\modules\mod_shoutbox\helper.php on line 608

C-Lodder commented 8 years ago

Hmm odd. I'll look into this later on today. I thought I'd fixed this issue after removing extract() :/

C-Lodder commented 8 years ago

@betteryouthanme - I have turned my error reporting to the maximum and still cannot replicate this error. I'm aware that you add cutting edge code to the Shoutbox when we push updates to Github, so please ensure you have added ALL code and not jus some of it.

I'd suggest downloading the update I've released a couple of minutes ago (v7.0.1):

https://github.com/JoomJunk/shoutbox/releases/download/7.0.1/mod_shoutbox_v7-0-1.zip

And trying again

betteryouthanme commented 8 years ago

hey, just tried again with the new version and if i activate Error Reporting Development in Joomla i get this message above each post. Also each time the shoutbox refresh i get a message like on the screenshot: 26-01-2016 12-23-25

As soon as i change to none error reporting all is find. Guess it's not really important just tripped over it and thought to report here

C-Lodder commented 8 years ago

On line 616 to 619, you will see the following:

foreach ($dom->getElementsByTagName('a') as $node) 
{
    $href = $node->getAttribute('href');
}

Could you replace this with:

$href = array();
foreach ($dom->getElementsByTagName('a') as $node) 
{
    $href = $node->getAttribute('href');
}
var_dump($href);

and let me know what it dumps out

betteryouthanme commented 8 years ago

for me the mentioned code is between lines 602-605. However if i change the code i get: array(0) { } Notice: Array to string conversion in C:\inetpub\wwwroot\www\modules\mod_shoutbox\helper.php on line 618

betteryouthanme commented 8 years ago

if i change Link profile to none in the back-end i don't get a error message. So must have something to do with Kunena profile link.

C-Lodder commented 8 years ago

Hmmm, odd. Would I have able to get FTP access or a backup of your site to test and fix? If so, please send details via email (admin@joomjunk.co.uk)

C-Lodder commented 8 years ago

Ahh crap. The error occurs when you're logged out. Looking into this now

C-Lodder commented 8 years ago

Fixed. Releasing an update now

betteryouthanme commented 8 years ago

thanks works like a charm!