Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PHP7 html_output.php errors


Peper

Recommended Posts

Hello there

Anyone got errors with PHP 7 for file includes/html_output.php

Warning: Illegal string offset 'type' in C:\xampp\htdocs\edge\includes\functions\html_output.php on line 409
Warning: Illegal string offset 'type' in C:\xampp\htdocs\edge\includes\functions\html_output.php on line 412
Warning: Illegal string offset 'type' in C:\xampp\htdocs\edge\includes\functions\html_output.php on line 413

and few other same type errors

I compared and could not figure this out

409:     $params['type'] = 'submit'; 

412:     if ( !in_array($params['type'], $types) ) {

413:       $params['type'] = 'submit';

416:     if ( ($params['type'] == 'submit') && isset($link) ) {

// Output a jQuery UI Button
  function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null, $style = null) {
    static $button_counter = 1;

    $types = array('submit', 'button', 'reset');

    if ( !isset($params['type']) ) {
      $params['type'] = 'submit';
    }

    if ( !in_array($params['type'], $types) ) {
      $params['type'] = 'submit';
    }

    if ( ($params['type'] == 'submit') && isset($link) ) {
      $params['type'] = 'button';
    }

    if (!isset($priority)) {
      $priority = 'secondary';
    }

    $button = NULL;

    if ( ($params['type'] == 'button') && isset($link) ) {
      $button .= '<a id="btn' . $button_counter . '" href="' . $link . '"';

      if ( isset($params['newwindow']) ) {
        $button .= ' target="_blank"';
      }
    } else {
      $button .= '<button ';
      $button .= ' type="' . tep_output_string($params['type']) . '"';
    }

    if ( isset($params['params']) ) {
      $button .= ' ' . $params['params'];
    }

    $button .= ' class="btn ';

    $button .= (isset($style)) ? $style : 'btn-default';

    $button .= '">';

    if (isset($icon) && tep_not_null($icon)) {
      $button .= ' <span class="' . $icon . '"></span> ';
    }

    $button .= $title;

    if ( ($params['type'] == 'button') && isset($link) ) {
      $button .= '</a>';
    } else {
      $button .= '</button>';
    }

    $button_counter++;

    return $button;
  }

 

Getting the Phoenix off the ground

Link to comment
Share on other sites

Which is your exact 2.3.4 BS version, aprox. download date?

2.3.4 BS is php 7 compatible since 2017-02-26. If your version is older you need to update.

Link to comment
Share on other sites

Ok, I found it

In admin i disabled modules 1 x 1 and once testimonials was disable warnings went away

So then checked 
Display the View button (for current testimonial) = true then errors pops up again

Module Version 2.1

Getting the Phoenix off the ground

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...