News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[4958] remove-dir bug

Started by sneils-, February 23, 2012, 07:55:53 AM

Previous topic - Next topic

sneils-

Hey,

first of all: It's a great job you're doing on the board software :)

My Version: 2.0.2

I found a little "bug" on Sources/Subs-Package.php line 1318:

1316 elseif ($actionType == 'remove-dir')
1317   {
1318      if (!is_writable($this_action['filename']) && file_exists($this_action['destination']))


While removing a directory, there is no "destination" attribute, hence this will always throw the following error (or some quite similar) onto the logs:

localhost/home/smf/index.php?action=admin;area=packages;sa=uninstall2;package=<mod>.zip;pid=9
8: Undefined index: destination
File: /var/www/smf/Sources/Subs-Package.php
Line: 1318


Easy to fix ;)

Have a nice day.
He took the time to press the shift key for every single letter. So of course he's right!

Kindred

hmmmm... you say always...   yet I have never seen that error in my error logs, despite multiple installs and uninstalls of mods which create (or remove) directories.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

sneils-

Okay sorry, that was a quick shot ^^
It will only appear on your log, if the directory is not writable of course, else it won't check the second part of that evaluation (the file_exists), where this error occures. It's minor, but I though I'm gonna report it nonetheless ;)
He took the time to press the shift key for every single letter. So of course he's right!

Joshua Dickerson

Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

emanuele

Cannot test at the moment and the package manager is not exactly my favourite piece of code... :P
destination should be changed to filename, right?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Spuds

That should be correct, and I think I took care of this in the pacman branch

emanuele

ohh great, then the bug is yours! :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

gvhools

Hello from greece,

i receive the same message when i m try to install simple portal 2.3.51
i change the line 1318  from:


if (!is_writable($this_action['filename']) && file_exists($this_action['destination']))


to:

if (!is_writable($this_action['filename']) && file_exists($this_action['filename']))


Error message:
http://www.xxxxxxx.gr/index.php?action=admin;area=packages;sa=uninstall2;package=SimplePortal_2.3.51.zip;pid=100
Apply Filter: Only show the errors with the same message
8: Undefined index: destination
Apply Filter: Only show the errors from this file
File: /hermes/xxxxxx014/b178/xxxxxxxx/Sources/Subs-Package.php
Line: 1318


I must do something elese?

Thank you
SMF: 2.0.2
Εμφάνιση: Vertex
Mods:
SimplePortal    2.3.5
Ohara YouTube Embed    1.0
Blue Smiley    1.0
RSS Feed Icon    1.1
Stop Forum Spam    1.0
Ad Managment    3.0.1
---------------------------------
Ελληνική κοινότητα ZorinOs

emanuele

The error message you posted is before or after the change?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

gvhools

After,but i see:
8: Undefined index: destination
but i have change destination to filename  ???
it looks like stuck.

it's a possible from this problem to be responsible my server?but i dont have the same problem with others mods.
SMF: 2.0.2
Εμφάνιση: Vertex
Mods:
SimplePortal    2.3.5
Ohara YouTube Embed    1.0
Blue Smiley    1.0
RSS Feed Icon    1.1
Stop Forum Spam    1.0
Ad Managment    3.0.1
---------------------------------
Ελληνική κοινότητα ZorinOs

gvhools

from "FTP Information Required"

Some of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders. Your FTP information may be temporarily cached for proper operation of the package manager. Note you can also do this manually using an FTP client - to view a list of the affected files please click here.
The following files need to made writable to continue installation:

/hermes/xxxxxxxxxxx/b178/xxxx.agapoulhs


SMF: 2.0.2
Εμφάνιση: Vertex
Mods:
SimplePortal    2.3.5
Ohara YouTube Embed    1.0
Blue Smiley    1.0
RSS Feed Icon    1.1
Stop Forum Spam    1.0
Ad Managment    3.0.1
---------------------------------
Ελληνική κοινότητα ZorinOs

emanuele

Quote from: gvhools on September 09, 2012, 08:36:10 AM
After,but i see:
8: Undefined index: destination
but i have change destination to filename  ???
it looks like stuck.
That's pretty strange, if you cahnged that line you cannot have an "Undefined index: destination" since there is no "destination" anywhere on that line...
Can you attach your Subs-Package.php?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

gvhools

Hello from Hellas,
Thank you for your interest emanuele,i thing the problem is my server :(
I will try again and if necessary will inform you.
SMF: 2.0.2
Εμφάνιση: Vertex
Mods:
SimplePortal    2.3.5
Ohara YouTube Embed    1.0
Blue Smiley    1.0
RSS Feed Icon    1.1
Stop Forum Spam    1.0
Ad Managment    3.0.1
---------------------------------
Ελληνική κοινότητα ZorinOs

Advertisement: