Resolved Bug


This bug has been marked as resolved.

Fatal error: func_get_args(): Can't be used as a function parameter in libraries/item_list.php on line 515

Permalink 0 7 Browser Info Environment
Using c5.5.2 and php5.2, DatabaseItemList::sortByMultiple gives this error:
Fatal error: func_get_args(): Can't be used as a function parameter in libraries/item_list.php on line 515


According to an article on StackOverflow (http://stackoverflow.com/questions/4979507/difference-in-behaviour-of-func-num-args-func-get-arg-and-func-get-args-from-php), the code of /concrete/libraries/item_list.php line 515
$this->sortByString = implode(', ', func_get_args());
will return an error.

Instead, the code from /concrete/libraries/item_list.php lines 508-514
$args = func_get_args();
      for ($i = 0; $i < count($args); $i++) {
         $this->sortByString .= $args[$i];
         if (($i + 1) < count($args)) { 
            $this->sortByString .= ', ';
         }
      }
does not produce an error in c5.5.2.


Status: Resolved
SkyBlueSofa
andrew replied on at Permalink
andrew
Yes. This is a known bug and has been fixed in github.

concrete5 Environment Information

# concrete5 Version
5.5.2

# concrete5 Packages
Designer Content (3.1), Page List Plus (5.5.0.0.2), Page List Teasers (1.2).

# concrete5 Overrides
blocks/vacature_intro, blocks/vacature_full, blocks/page_list, themes/featuring

# Server Software
Apache/2.2.14

# Server API
apache2handler

# PHP Version
5.2.12

# PHP Extensions
apache2handler, ctype, curl, date, dom, exif, filter, ftp, gd, gettext, hash, iconv, imap, json, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, posix, Reflection, session, SimpleXML, soap, SPL, standard, tokenizer, xml, xmlreader, xmlwriter, xsl, zlib.

# PHP Settings
log_errors_max_len - 1024
max_execution_time - 30
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
memory_limit - 48M
post_max_size - 32M
safe_mode - Off
safe_mode_exec_dir - <i>no value</i>
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
suhosin.log.phpscript.is_safe - Off
upload_max_filesize - 32M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
pcre.backtrack_limit - 100000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH

Browser User-Agent String

Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11