File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -127,15 +127,25 @@ public function setPermissions($permissions)
127127 $ permissions = 0700 ;
128128 } else {
129129 $ oct = intval ($ permissions , 8 );
130- $ dec = octdec ($ permissions );
131- if ($ dec < 1 || $ dec > 261 ) {
130+ $ dec = octdec ($ oct );
131+ if ($ dec < 1 || $ dec > octdec ( 0777 ) ) {
132132 throw new Exception (sprintf ('invalid permissions: %s ' , $ permissions ));
133133 }
134134 $ permissions = $ oct ;
135135 }
136136 $ this ->permissions = $ permissions ;
137137 }
138138
139+ /**
140+ * Permission getter.
141+ *
142+ * @return integer
143+ */
144+ public function getPermissions ()
145+ {
146+ return $ this ->permissions ;
147+ }
148+
139149 /**
140150 * Directory setter.
141151 *
@@ -193,7 +203,7 @@ public function setFile($file, $time = null)
193203 */
194204 public function setupPath ()
195205 {
196- //if directory doesn't exist, create it
206+ // if directory doesn't exist, create it
197207 if (!is_dir ($ this ->path )) {
198208 $ reporting = error_reporting ();
199209 error_reporting (0 );
You can’t perform that action at this time.
0 commit comments