Commit 9792bd0
authored
Update tinyfilemanager.php (#1268)
running envirement: Android 4.4+PHP 7.4.3+ KSWEB
http://192.168.1.2/tinyfilemanager.php, afer login,the main page could not be showed entirely,it just shows half of navigation bar.
that's becuase of
there are two same lines of codes which cause the problem. they are
$owner = posix_getpwuid(fileowner($path . '/' . $f));
when the funciton fileowner($path . '/' . $f) return 0 and run the function posix_getpwuid(....), it trig an error.
please check the codes in line 2156--2168 and 2221--2233
suggest replace these two parts with followed codes:
$owner = array('name' => '?');
$group = array('name' => '?');
if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) {
try{
$owner_id = fileowner($path . '/' . $f);
if($owner_id != 0) {
$owner_info = posix_getpwuid($owner_id);
if ($owner_info) {
$owner = $owner_info;
}
}
$group_id = filegroup($path . '/' . $f);
$group_info = posix_getgrgid($group_id);
if ($group_info) {
$group = $group_info;
}
} catch(Exception $e){
error_log("exception:" . $e->getMessage());
}
}1 parent 232fc78 commit 9792bd0
1 file changed
+40
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2153 | 2153 | | |
2154 | 2154 | | |
2155 | 2155 | | |
| 2156 | + | |
| 2157 | + | |
2156 | 2158 | | |
2157 | | - | |
2158 | | - | |
2159 | | - | |
2160 | | - | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
2161 | 2176 | | |
2162 | | - | |
2163 | | - | |
2164 | | - | |
2165 | | - | |
2166 | | - | |
2167 | | - | |
2168 | 2177 | | |
| 2178 | + | |
2169 | 2179 | | |
2170 | 2180 | | |
2171 | 2181 | | |
| |||
2218 | 2228 | | |
2219 | 2229 | | |
2220 | 2230 | | |
| 2231 | + | |
| 2232 | + | |
2221 | 2233 | | |
2222 | | - | |
2223 | | - | |
2224 | | - | |
2225 | | - | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
2226 | 2251 | | |
2227 | | - | |
2228 | | - | |
2229 | | - | |
2230 | | - | |
2231 | | - | |
2232 | | - | |
2233 | 2252 | | |
| 2253 | + | |
2234 | 2254 | | |
2235 | 2255 | | |
2236 | 2256 | | |
| |||
0 commit comments