Ticket #152 (new enhancement)

Opened 4 months ago

Last modified 4 months ago

add validation for options passes to MakeDocs

Reported by: anonymous Owned by: pmjones
Priority: minor Component: code
Keywords: Cc: deniz.adrian@…

Description

the cli-application "MakeDocs?" uses a default of "/" for both options "class-dir" and "package-dir", as returned by Solar_Dir::fix(null)..

Setting those to 'require' => true, 'param' => 'required' fixes that problem.

additionaly, line 741 evaluates to true if a file with that name exists, making mkdir throw a warning. fixed too.

Attachments

options.php.diff (0.7 kB) - added by zined 4 months ago.
options.php.diff
MakeDocs.php.diff (506 bytes) - added by zined 4 months ago.
MakeDocs?.php.diff

Change History

Changed 4 months ago by zined

options.php.diff

Changed 4 months ago by zined

MakeDocs?.php.diff

Changed 4 months ago by pmjones

(In [3382]) Solar_Cli_MakeDocs: [FIX] Make the class and package dirs options required. Thanks, Zined.

refs #152

Changed 4 months ago by pmjones

Zined, I have a question about the second part of your report. When I do this:

touch tempfile
php -r "var_dump(is_dir('./tempfile'));"

I get bool(false), which is correct. Can you tell me how to duplicate the error you're seeing in relation to file_exists()/is_dir() differences?

Changed 4 months ago by zined@…

Hi Paul,

it's not is_dir() not working correct, but just beeing imho wrong in that place:

having a file "/foo", is_dir("/foo") returning false, calling mkdir("/foo") shouldn't be performed if i don't get this wrong.

greetingz

Add/Change #152 (add validation for options passes to MakeDocs)

Author



Action
as new
 
Note: See TracTickets for help on using tickets.