*

krallen

  • ***
  • 36 posts
Print PDF Osclass Plugin
« on: August 13, 2024, 01:13:09 PM »
Print PDF Osclass Plugin

debug error :

PHP Deprecated:  The each() function is deprecated. This message will be suppressed on further calls in....

change edit  :
20950:

/public_html/oc-content/plugins/printpdf/tcpdf/tcpdf.php

old :
Code: [Select]
// get attributes
preg_match_all('/([^=\s]*)[\s]*=[\s]*"([^"]*)"/', $element, $attr_array, PREG_PATTERN_ORDER);
$dom[$key]['attribute'] = array(); // reset attribute array
while (list($id, $name) = each($attr_array[1])) {
$dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id];
}
if (!empty($css)) {
// merge CSS style to current style
list($dom[$key]['csssel'], $dom[$key]['cssdata']) = $this->getCSSdataArray($dom, $key, $css);
$dom[$key]['attribute']['style'] = $this->getTagStyleFromCSSarray($dom[$key]['cssdata']);
}
// split style attributes
if (isset($dom[$key]['attribute']['style']) AND !empty($dom[$key]['attribute']['style'])) {
// get style attributes
preg_match_all('/([^;:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER);
$dom[$key]['style'] = array(); // reset style attribute array
while (list($id, $name) = each($style_array[1])) {
// in case of duplicate attribute the last replace the previous
$dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]);
}






new:
Code: [Select]
// get attributes
preg_match_all('/([^=\s]*)[\s]*=[\s]*"([^"]*)"/', $element, $attr_array, PREG_PATTERN_ORDER);
$dom[$key]['attribute'] = array(); // reset attribute array

// each() yerine foreach kullanarak iyileştirilmiş kod
foreach ($attr_array[1] as $id => $name) {
$dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id];
}

if (!empty($css)) {
// merge CSS style to current style
list($dom[$key]['csssel'], $dom[$key]['cssdata']) = $this->getCSSdataArray($dom, $key, $css);
$dom[$key]['attribute']['style'] = $this->getTagStyleFromCSSarray($dom[$key]['cssdata']);
}
// split style attributes
if (isset($dom[$key]['attribute']['style']) AND !empty($dom[$key]['attribute']['style'])) {
// get style attributes
preg_match_all('/([^;:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER);
$dom[$key]['style'] = array(); // reset style attribute array

// each() yerine foreach kullanımı
foreach ($style_array[1] as $id => $name) {
// in case of duplicate attribute the last replace the previous
$dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]);
}



*

MB Themes

Re: Print PDF Osclass Plugin
« Reply #1 on: August 13, 2024, 01:27:00 PM »
Thanks ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots