Status
Not open for further replies.

Pandemikk

Former Developer
Using insert image in the editor prompts a pop-up error.

<br /><strong>Warning</strong>: getimagesize({image}) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in <strong>[path]/dbtech/credits/credits_vbulletin.php</strong> on line <strong>324</strong><br /><br /><strong>Warning</strong>: filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for {image} in <strong>[path]/dbtech/credits/credits_vbulletin.php</strong> on line <strong>325</strong><br />error: Invalid File
 
Inserting image via URL with the "Retrieve remote file" box ticked = error

When attempting to insert an image into a post via the image button -> URL -> paste URL and tick the "Retrieve remote file" box, the following error is produced:

<br />
<b>Warning</b>: filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for http://dl.dropbox.com/u/13049666/vbanal.png in <b>[path]/dbtech/credits/credits_vbulletin.php</b> on line <b>333</b><br />
 
Edit (forums)/dbtech/credits/credits_vbulletin.php find

PHP:
                    $file = array();
                    list($file['width'], $file['height']) = getimagesize($url[0]);
                    $file['size'] = filesize($url[0]);

replace with

PHP:
                    $file = array('size' => 0);
                    list($file['width'], $file['height']) = getimagesize($url[0]);
    
                    $c = curl_init($url[0]);
                    curl_setopt($c, CURLOPT_NOBODY, true);
                    curl_setopt($c, CURLOPT_HEADER, true);
                    curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
                    curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
                    $data = curl_exec($c);
                    curl_close($c);
    
                    if ($data !== false AND preg_match('/Content-Length: (\d+)/', $data, $matches)) $file['size'] = floatval($matches[1]);

(this has been hotfixed :) )
 
Status
Not open for further replies.

Similar threads

Legacy vBCredits II Deluxe

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
846
Customer rating
0.00 star(s) 0 ratings
Back
Top