Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Commit

Permalink
修复 PHP 5.6 一下代码自动生成报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yuan1994 committed Nov 17, 2016
1 parent 55b794e commit b24b24f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extend/Generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ public function run($data, $option = 'all')
* 检查当前模块目录是否可写
* @return bool
*/
public static function checkWritable($path = APP_PATH . 'admin' . DS)
public static function checkWritable($path = null)
{
if (null === $path) {
$path = APP_PATH . 'admin' . DS;
}
try {
$testFile = $path . "bulid.test";
if (!file_put_contents($testFile, "test")) {
Expand Down

0 comments on commit b24b24f

Please sign in to comment.