Advertisement:

Author Topic: 2: Parameter 1 to smart_pagination_buffer() expected to be a reference  (Read 410 times)

Offline spiros

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 1,977
  • Gender: Male
  • A different point of view
    • spiros.doikas on Facebook
    • doikas on LinkedIn
    • @greektranslator on Twitter
    • Greek Translation
I get this error in SMF log for every page visited.

Code: [Select]
2: Parameter 1 to smart_pagination_buffer() expected to be a reference, value given
https://www.translatum.gr/forum/index.php

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,661
  • Gender: Male
    • i30 Owners Club
And that's all that's shown in the log? No php file mentioned? No line number?

Offline d3vcho

  • Sempiterno
  • On Hiatus
  • SMF Hero
  • *
  • Posts: 4,784
  • Gender: Male
    • frandominguez03 on GitHub
It seems it's not a SMF function, so it might be a mod related issue.
"Greeting Death as an old friend, they departed this life as equals"

Offline spiros

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 1,977
  • Gender: Male
  • A different point of view
    • spiros.doikas on Facebook
    • doikas on LinkedIn
    • @greektranslator on Twitter
    • Greek Translation
It is shown in SMF error log.

I have this mod installed: Smart Pagination
http://custom.simplemachines.org/mods/index.php?mod=3235

In its hooks file it has:

Code: [Select]
// Hooks
$hooks = array(
'integrate_pre_include' => '$sourcedir/Subs-Pagination.php',
'integrate_menu_buttons' => 'smart_pagination_load_css',
'integrate_messageindex_buttons' => 'smart_pagination_messageindex',
'integrate_display_buttons' => 'smart_pagination_display',
'integrate_buffer' => 'smart_pagination_buffer'
);

and in Subs-Pagination.php

Code: [Select]
function smart_pagination_buffer(&$buffer)
{
global $context, $txt;

if (isset($_REQUEST['xml']) || empty($context['page_index'])) return $buffer;

maybe some php version incompatibility? I use php 7.1

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,661
  • Gender: Male
    • i30 Owners Club
Quote from: spiros

I have this mod installed: Smart Pagination

Well there ya go.

Here's the support thread for that mod:


https://www.simplemachines.org/community/index.php?topic=457180.0


You'll probably get away with changing
Code: [Select]
function smart_pagination_buffer(&$buffer)
to
Code: [Select]
function smart_pagination_buffer($buffer)