Self-Evident / OneFileCMS

A single file cms - all in one file!
http://onefilecms.com/
165 stars 57 forks source link

Array syntax throws error on PHP 5.2.17 #52

Open Fintasys opened 5 years ago

Fintasys commented 5 years ago

Got asked by a friend yesterday what's wrong with the script, why isn't it working. So I checked it and found out that this array syntax seems not to work on PHP 5.2.17 (edit: supported from PHP 5.4.0):

$ugt = ['...', '..t', '.g.', '.gt', 'u..', 'u.t', 'ug.', 'ugt']; //SetUid SetGid sTicky $rwx = ['---', '--x', '-w-', '-wx', 'r--', 'r-x', 'rw-', 'rwx'];

I had to change it to this, to make the script working.

$ugt = array('...', '..t', '.g.', '.gt', 'u..', 'u.t', 'ug.', 'ugt'); //SetUid SetGid sTicky $rwx = array('---', '--x', '-w-', '-wx', 'r--', 'r-x', 'rw-', 'rwx');

Created a Pull Request for this issue https://github.com/Self-Evident/OneFileCMS/pull/53

kijato commented 5 years ago

I am using the original version with "PHP Version 7.0.33-0+deb9u3" without problem. Need I change these rows or not? What do you guess?

Fintasys commented 5 years ago

@kijato No, you don't need to change anything. The lines above are only for php 5.4 and below.