Bug Tracker

Ticket #2936 (new bug)

Opened 6 months ago

Last modified 6 months ago

getAttribute is not a function

Reported by: joomlapreak Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.3 Component: core
Version: 1.2.5 Keywords:
Cc: Needs: Test Case

Description

message on firebug console

a.getAttribute is not a function while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){v... jquery-1.2.5.min.... (line 25)

this is the relevant part of php file try {

$dapp1a = new Dapp('fryoutube','http://youtube.com/results?search_query='.$search);

$domDoc = $dapp1a->getDOM();

$html ='<div id="w_fryoutube"><div class="inside_10">';

$video = $domDoc->getElementsByTagName('youtube'); for ($i = 0; $i < $ct; $i++) {

$title = $video->item($i)->getElementsByTagName("title")->item(0)->nodeValue; $duration = $video->item($i)->getElementsByTagName("duration")->item(0)->nodeValue; $views = $video->item($i)->getElementsByTagName("views")->item(0)->nodeValue; $by = $video->item($i)->getElementsByTagName('by')->item(0)->nodeValue; $tn1 = $video->item($i)->getElementsByTagName("thumbnail")->item(0); $tn = $tn1->getAttribute("src"); $vid = substr($tn,22,-12); $link = 'http://www.youtube.com/v/'.$vid.'&hl=en';

.......

At the time of this writing I am getting an error in my echoed html also but that is like irregular. Somethimes it does echo content correctly.

<br /> <b>Fatal error</b>: Call to a member function getAttribute() on a non-object in <b>/home/delhimen/public_html /frlounge/dapper/widgets/w_fryoutube.php</b> on line <b>27</b><br />

the line 27 in the php file is where the getAttribute("src") is used.

Attachments

Change History

Changed 6 months ago by flesler

  • need changed from Review to Test Case

I don't understand.. is this a php issue ?

Could you provide the resulting html, with the used js where the error is visible ? We can't handle problems without test cases.

Thanks

Note: See TracTickets for help on using tickets.