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

dharmanerd - July 19, 2008 - 09:17
Project:BitTorrent
Version:5.x-2.0-beta3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

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)) {

#1

dharmanerd - July 19, 2008 - 09:29

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

bradfordcp - July 19, 2008 - 14:44

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

Thanks!

#3

dharmanerd - July 19, 2008 - 23:21

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

bradfordcp - July 24, 2008 - 14:45

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

overall - July 8, 2009 - 03:05
Status:active» won't fix

5.x version is longer not supported.

 
 

Drupal is a registered trademark of Dries Buytaert.