Bug Tracker

Opened 12 years ago

Closed 11 years ago

Last modified 8 years ago

#2936 closed bug (invalid)

getAttribute is not a function

Reported by: joomlapreak Owned by:
Priority: major Milestone: 1.3
Component: core Version: 1.2.5
Keywords: Cc:
Blocked by: Blocking:

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.

Change History (2)

comment:1 Changed 12 years ago by flesler

need: ReviewTest 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

comment:2 Changed 11 years ago by dmethvin

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.