[3.6 devel] fix some syntax errors for PHP5.4/MySQL5.5

News and discussion about beta versions and CVS changes
Mocchi
Posts: 10
Joined: Sun Jan 08, 2012 12:35 pm

[3.6 devel] fix some syntax errors for PHP5.4/MySQL5.5

Postby Mocchi » Sun Sep 16, 2012 6:12 am

Hi,

As you know, our 3.6 series includes some syntax errors against PHP5.4 and MySQL5.5. I recognized this bad issue as crucial and review 3.6 codes, then push some codes to fix this issue into 'Nucleus-3.6' branch.

FIX: fix some grammatical errors against PHP5 and MySQL5
http://nucleuscms.git.sourceforge.net/g ... 9fd0d2a80f

1. [PHP5] unusual usage of reference in function calling
See: http://php.net/manual/en/language.references.pass.php

"There is no reference sign on a function call - only on function definitions." in PHP document. This is an issue for calling and defining of whole functions (built-in and user-defined).

2. [PHP5] needless usage of reference in argument for 'callable' type hint
See: http://php.net/manual/en/language.types.callable.php

The first argument of call_user_func() and call_user_func_array() is defined as 'callable' type hint.
When we call some methods in a certain object, we can use array implementation like array($instance, 'method name') for 'callable' type hint argument. Here we might think "$instance should be with reference" like array(&$instance, 'method name') but this is needless because the array is handled as 'callable' type hint. The first parameter of array in 'callable' type hint is handled as a reference automatically.

3. [MySQL5] TYPE option in SQL statement is completely obsoleted by ENGINE option
See: http://dev.mysql.com/doc/refman/5.5/en/ ... table.html

"The older TYPE option was synonymous with ENGINE. TYPE was deprecated in MySQL 4.0 and removed in MySQL 5.5. When upgrading to MySQL 5.5 or later, you must convert existing applications that rely on TYPE to use ENGINE instead."



The main cause for this issue is old codes with some deprecated functions in PHP5 and MySQL5. We should have changed these deprecates before completely obsoleted, but didn't... Now the codes becomes complete syntax errors.

We have not discuss the date of maintained release of 3.6 yet because we have some work for changing version control system (VSC) from SVN to git and the way to receive git-pull-request, enclosing developer mailing list (I mean anyone can browse archives and free to subscribe, unsubscribe) and 4.0 development with better internationalization.

We're happy to receive your test report, especially regression report.
flashRU
Posts: 50
Joined: Sun Dec 30, 2007 7:34 pm

Postby flashRU » Sat Oct 13, 2012 11:03 am

Perfectly work.
flashRU
Posts: 50
Joined: Sun Dec 30, 2007 7:34 pm

Postby flashRU » Sun Oct 14, 2012 6:14 am

Problem with character set in admin area.
Mocchi
Posts: 10
Joined: Sun Jan 08, 2012 12:35 pm

Postby Mocchi » Sun Oct 14, 2012 6:37 am

flashRU wrote:Problem with character set in admin area.


Hmm. I guess you use 4.0 sources because I didn't commit some modification related to characters into 3.6 branch. Would you please confirm you utilize the sources of 3.6 branch?

Easy instruction to checkout 3.6 branch:
(with git client and clone remote repository into local repository)
$ git clone git://nucleuscms.git.sourceforge.net/gi ... nucleuscms
(move to cloned local repository)
$ cd nucleuscms
(checkout 3.6 branch because current is master branch for 4.0 release)
$ git checkout -b Nucleus-3-6 remotes/origin/Nucleus-3-6

Regards
flashRU
Posts: 50
Joined: Sun Dec 30, 2007 7:34 pm

Postby flashRU » Sun Oct 14, 2012 11:21 am

I finded this branch. :(

globalfunction.php

// needed if we include globalfunctions from install.php
global $nucleus, $CONF, $DIR_LIBS, $DIR_LANG, $manager, $member;

$nucleus['version'] = 'v3.64';
$nucleus['codename'] = '';

Mocchi
Posts: 10
Joined: Sun Jan 08, 2012 12:35 pm

Postby Mocchi » Sun Oct 14, 2012 12:15 pm

flashRU wrote:$nucleus['version'] = 'v3.64';


I didn't touch this line because currently I don't have some agreement for a new release in original developing team. There is no reply for my post...

flashRU wrote:I finded this branch.


OK. FYI 3.6 branch is a lack of processing multi-byte (non-ASCII) characters. In other words, 3.6 branch cannot deal with non-ASCII characters correctly. I guess this causes your issue.

If you want to know more details, please research your issue deeper and find the bug codes. Without it I cannot resolve your issue.

Thanks

Return to “Core Development”