wholeinsoul / telekinesis

Automatically exported from code.google.com/p/telekinesis
0 stars 0 forks source link

Undefined variables / indexes #112

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Turn on display_errors in /etc/php.ini
2. Set error_reporting = E_ALL in /etc/php.ini 
3. Go to iPhone Remote and look at the Applications, Scripts, Documents, or
Files

What is the expected output? What do you see instead?
I see a bunch of PHP warnings about undefined variables and indexes

What version of the product are you using? On what operating system?
The latest, on Mac OS X Leopard

Please provide any additional information below.
In PHP, you should never reference a variable that may not be defined
(always define the default value of the variable first).  Also, you should
never index into an array if the index may not exist.  I have made changes
to my local copy but cannot figure out how to contribute the changes.  So I
am attaching them now. Just diff them against your copies and you'll see
what I mean.

I would be happy to contribute to this project, fix the issues about, and
deal with security concerns.  Feel free to contact me to get me involved.

Original issue reported on code.google.com by jonai...@gmail.com on 10 Nov 2007 at 9:25

Attachments:

GoogleCodeExporter commented 8 years ago
I've been experiencing the exact same error messages when using iPhone Remote.  
Replacing the dirlist and 
filerow files with your versions fixed most of my issues.  Thanks!

I still have problems with Spotlight & Terminal, but now I can now use 
Applications, Documents, Files, and 
Scripts.

For some reason,  replacing the index file with your version actually 
introduced an error.  Here is what I saw:

Warning: include(../../common/filerow.php) [function.include]: failed to open 
stream: No such file or directory 
in /Applications/iPhone Remote.app/Contents/Resources/www/index.php on line 2

Warning: include() [function.include]: Failed opening 
'../../common/filerow.php' for inclusion 
(include_path='.:') in /Applications/iPhone 
Remote.app/Contents/Resources/www/index.php on line 2

Original comment by scottrus...@gmail.com on 12 Jan 2008 at 1:07