getPage php warning invalid arguments passed

Summary

There was an error in the logs. Recently updated to the current version. I can’t repeat the problem. I don’t understand what the problem is. pdoTools is also installed.

core/components/getpage/include.getpage.php : 35) PHP warning: implode(): Invalid arguments passed

Environment

core/components/getpage/include.getpage.php : 35) PHP warning: implode(): Invalid arguments passed

MODX Revolution 2.8.3-pl (advanced)
ExtJS:3.4.1
Smarty:3.1.39
PHPMailer:6.4.1
Версия MagpieRSS:0.72
PDO support:
enabled
PDO drivers:
dblib, firebird, mysql, pgsql, sqlite
PDO Driver for MySQL:
enabled
Client API version:
mysqlnd 7.4.16
Directive:
Local Value,Master Value
enabled
Zip version:
1.15.6
Libzip headers version:
1.5.1
Libzip library version:
1.5.1
allow_url_fopen:
On
allow_url_include:
Off
arg_separator.input:
&
arg_separator.output:
&
auto_append_file:
no value
auto_globals_jit:
On
auto_prepend_file:
no value
browscap:
no value
default_charset:
UTF-8
default_mimetype:
text/html
disable_classes:
no value
disable_functions:
no value
display_errors:
Off
display_startup_errors:
On
doc_root:
no value
docref_ext:
no value
docref_root:
no value
enable_dl:
Off
enable_post_data_reading:
On
error_append_string:
no value
error_log:
no value
error_prepend_string:
no value
error_reporting:
32767
expose_php:
On
extension_dir:
/usr/lib64/php7.4/lib/extensions/no-debug-non-zts-20190902
file_uploads:
On
hard_timeout:
2
highlight.comment:
#FF8000
highlight.default:
#0000BB
highlight.html:
#000000
highlight.keyword:
#007700
highlight.string:
#DD0000
html_errors:
On
ignore_repeated_errors:
Off
ignore_repeated_source:
Off
ignore_user_abort:
Off
implicit_flush:
Off
include_path:
.:/usr/share/php7:/usr/share/php
input_encoding:
no value
internal_encoding:
no value
log_errors:
On
log_errors_max_len:
1024
mail.add_x_header:
On
mail.force_extra_parameters:
no value
mail.log:
no value
max_execution_time:
10
max_file_uploads:
20
max_input_nesting_level:
64
max_input_time:
60
max_input_vars:
1000
memory_limit:
128M
open_basedir:
no value
output_buffering:
4096
output_encoding:
no value
output_handler:
no value
post_max_size:
64M
precision:
14
realpath_cache_size:
4096k
realpath_cache_ttl:
120
register_argc_argv:
Off
report_memleaks:
On
report_zend_debug:
On
request_order:
GP
sendmail_from:
no value
sendmail_path:
/usr/sbin/sendmail -t -i
serialize_precision:
17
short_open_tag:
On
SMTP:
localhost
smtp_port:
25
sys_temp_dir:
no value
syslog.facility:
LOG_USER
syslog.filter:
no-ctrl
syslog.ident:
php
track_errors:
Off
unserialize_callback_func:
no value
upload_max_filesize:
64M
upload_tmp_dir:
no value
user_dir:
no value
user_ini.cache_ttl:
300
user_ini.filename:
.user.ini
variables_order:
GPCS
xmlrpc_error_number:
0
xmlrpc_errors:
Off
zend.assertions:
1
zend.detect_unicode:
On
zend.enable_gc:
On
zend.exception_ignore_args:
Off
zend.multibyte:
Off
zend.script_encoding:
no value
zend.signal_check:
Off

The warning occurs on this line

when the value of $nav['pages'] is not an array.

Set the value of the “page” url parameter to a value that is bigger than the number of pages you have (...&page=1000) and you should see the warning again.


To get rid of the warning you could initialize $nav['pages'] with an empty array right before the for-loop on line 13.

$nav['pages'] = array();
2 Likes

Thanks, bro! I really appreciate your work!

I’m getting the same error but it seems to be within the Articles extra. Any tips on how to fix this?

The extra “Articles” uses “getPage” too internally. So you probably can fix it the same way.

1 Like

Thank you - also found this which for a numpty like me is the fool-proof!..

I get that in articles too. I think it happens when you add a new page that isn’t published yet. I’ve been ignoring it, but I’m glad to see the likely fix.