Skip to content

fix scandir() sorting parameter work with php-5.3.x#182

Merged
Patriboom merged 1 commit intopixeline:masterfrom
kun432:fix_user_add
Dec 21, 2017
Merged

fix scandir() sorting parameter work with php-5.3.x#182
Patriboom merged 1 commit intopixeline:masterfrom
kun432:fix_user_add

Conversation

@kun432
Copy link
Copy Markdown

@kun432 kun432 commented Nov 19, 2017

Simple and Neat! Great works.

Anyway, Now I'm in translation with Japanese, and before that, fix 2.

  1. scandir() parameter "SCANDIR_SORT_ASCENDING" constants seems not works PHP-5.3.X, but works since PHP-5.4.0.

http://php.net/manual/en/function.scandir.php
http://php.net/manual/en/dir.constants.php

I'm using CentOS 6.9+PHP-5.3.3-49, following error ocurrs,

Unhandled Exception

Message:

Error rendering view: [administration.users.add]

Use of undefined constant SCANDIR_SORT_ASCENDING - assumed 'SCANDIR_SORT_ASCENDING'
Location:

/var/www/html/app/application/views/administration/users/add.php on line 48
Stack Trace:

#0 /var/www/html/app/laravel/laravel.php(42): Laravel\Error::native(8, 'Use of undefine...', '/var/www/html/a...', 48)
#1 /var/www/html/app/laravel/view.php(376) : eval()'d code(48): Laravel\{closure}(8, 'Use of undefine...', '/var/www/html/a...', 48, Array)
#2 /var/www/html/app/laravel/view.php(376): eval()
#3 /var/www/html/app/laravel/view.php(344): Laravel\View->get()
#4 /var/www/html/app/laravel/view.php(438): Laravel\View->render()
#5 /var/www/html/app/laravel/view.php(363): Laravel\View->data()
#6 /var/www/html/app/laravel/view.php(344): Laravel\View->get()
#7 /var/www/html/app/laravel/view.php(581): Laravel\View->render()
#8 /var/www/html/app/laravel/response.php(246): Laravel\View->__toString()
#9 /var/www/html/app/laravel/laravel.php(177): Laravel\Response->render()
#10 /var/www/html/index.php(19): require('/var/www/html/a...')
#11 {main}

Requirements says "PHP 5.3+", however this feature will not be backported to PHP-5.3 on CentOS/RHEL anymore. So, you have choices. This is always difficult....

  1. /administration/users/add shows user's languages, and it lists "all.php", too. Fixed this.

@Patriboom Patriboom merged commit f7d1235 into pixeline:master Dec 21, 2017
@kun432
Copy link
Copy Markdown
Author

kun432 commented Dec 21, 2017

thnx! Now I’m ready to translate for Japanese! 😄

@Patriboom
Copy link
Copy Markdown
Collaborator

Yes.
Please, don't forget to have look on app/vendor/ckeditor/lang/ja.js (the ckeditor part) when you'll translate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants