Download & Extend

array_key_exists(): The second argument should be either an array or object line 351

Project:BitTorrent
Version:5.x-2.0-beta3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

to fix add the following code below $torrent = array(); (line 233 in bittorrent.module).

line 233 $torrent = array();
new line 234 $torrent['info'] = array();

--------------------

line 221, why not use empty?
if (!empty($node->web_seeding_path)) {

Comments

#1

spoke too soon. i had to move both lines 233, 234 (after adding the new line mentioned above)

          $torrent = array();
          $torrent['info'] = array();

put them around line 342
          $torrent = array();
          $torrent['info'] = array();
                   
        if (variable_get('bt_override_announce', 1) == 0) {
          $torrent['announce'] = variable_get('bt_override_announce_url', $torrent['announce']);
        }
       
        db_query("INSERT INTO {bt_torrents}(nid, info_hash, use_announce, metadata, web_seed_path) VALUES...
line 351        if (array_key_exists('files', $torrent['info'])) {

#2

Out of curiosity where were you getting that error? What was the URL?

Thanks!

#3

I was getting the error after saving a new torrent node (case "insert").

I'm having all kinds of other issues too. It may be due to the fact that every module and drupal is using the most current version. Some of the other issues (which I'll post after I have more info) are file upload box for torrent doesn't upload the file I have to use the drupal file upload. I also can't upload multiple files.

#4

The torrent module limits only one torrent file per torrent node, so if a file is already attached (or been uploaded), then it disables the file upload. I would like to get some more updates in there as well as port to Drupal 6. I am a little swamped right now, but I will try and get some more fixes in soon.

#5

Status:active» closed (won't fix)

5.x version is longer not supported.