Forum


Replies: 6   Views: 4223
I get an error "accessing static property html2wordml::$strictwordstyles"
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by davidfirst  · 03-01-2014 - 20:23

While creating doc/pdf documents we get tons of error such as:



Accessing static property HTML2WordML::$strictWordStyles as non static in /phpdocx_corporate/classes/HTML2WordML.inc on line 469



with different line numbers (1496, 896, 1533, 1483).



Note that, it is not a notice or warning, it is a PHP Error. 



How can I get rid of it? I can change the $strictWordStyles variable to not be static. not sure how the software will behave though..



 


Posted by jorgelj  · 04-01-2014 - 09:39

Hello,



Please post the output of check.php. That issue shouldn't stop the script.



Regards.


Posted by davidfirst  · 05-01-2014 - 16:50

OK PHP version is 5.3.3

OK Zip support is enabled.

OK XSL support is enabled.

OK DOM support is enabled.

OK XML support is enabled.

OK Tidy support is enabled.

Warning The path examples/docx used by the examples isn't writable.

OK The library can write to temp folder.



 



Correct, it doesn't stop the script. However, I configured the system to send me an email on every php error, in order to get more control over the stability of the site. When a user generate files I get so many emails which is annoying.



Thanks in advance. 



 



 


Posted by jorgelj  · 07-01-2014 - 09:45

Hello,



Thanks for the info, we have fixed it on the current dev version. We plan to release a new version ASAP.



Regards.


Posted by davidfirst  · 07-01-2014 - 16:21

OK, Thanks!


Posted by ftd.inm@gmail.com  · 13-01-2014 - 18:08

Feel free to use it while the devs fix it as well.

diff -rupN ./classes/HTML2WordML.inc /home/mauricio/Sites/sistema-de-ensino-2013/www/gasp/includes/libs/phpdocx/classes/HTML2WordML.inc
--- ./classes/HTML2WordML.inc 2014-01-13 10:43:12.000000000 -0200
+++ /home/mauricio/Sites/sistema-de-ensino-2013/www/gasp/includes/libs/phpdocx/classes/HTML2WordML.inc 2014-01-13 14:38:21.847548485 -0200
@@ -48,7 +48,7 @@ class HTML2WordML {
* @static
* @var string
*/
- public static $customListStyles;
+ public $customListStyles;
/**
*
* @access public
diff -rupN ./lib/fpdi/fpdf_tpl.php /home/mauricio/Sites/sistema-de-ensino-2013/www/gasp/includes/libs/phpdocx/lib/fpdi/fpdf_tpl.php
--- ./lib/fpdi/fpdf_tpl.php 2014-01-13 10:43:12.000000000 -0200
+++ /home/mauricio/Sites/sistema-de-ensino-2013/www/gasp/includes/libs/phpdocx/lib/fpdi/fpdf_tpl.php 2014-01-13 14:38:22.411548504 -0200
@@ -259,7 +259,7 @@ class FPDF_TPL extends FPDF {
/**
* See FPDF/TCPDF-Documentation ;-)
*/
- public function SetFont($family, $style = '', $size = 0) {
+ public function SetFont($family, $style = '', $size = 0, $fontfile = '', $subset = 'default') {
if (is_subclass_of($this, 'TCPDF')) {
$args = func_get_args();
return call_user_func_array(array($this, 'TCPDF::SetFont'), $args);
@@ -285,7 +285,7 @@ class FPDF_TPL extends FPDF {
/**
* See FPDF/TCPDF-Documentation ;-)
*/
- function Image($file, $x = null, $y = null, $w = 0, $h = 0, $type = '', $link = '') {
+ function Image($file, $x = null, $y = null, $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false, $dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false, $hidden = false, $fitonpage = false) {
if (is_subclass_of($this, 'TCPDF')) {
$args = func_get_args();
return call_user_func_array(array($this, 'TCPDF::Image'), $args);
@@ -306,7 +306,7 @@ class FPDF_TPL extends FPDF {
*
* AddPage is not available when you're "in" a template.
*/
- function AddPage($orientation = '', $format = '') {
+ function AddPage($orientation = '', $format = '', $keepmargins = false, $tocpage = false) {
if (is_subclass_of($this, 'TCPDF')) {
$args = func_get_args();
return call_user_func_array(array($this, 'TCPDF::AddPage'), $args);
@@ -321,7 +321,7 @@ class FPDF_TPL extends FPDF {
/**
* Preserve adding Links in Templates ...won't work
*/
- function Link($x, $y, $w, $h, $link) {
+ function Link($x, $y, $w, $h, $link, $spaces = 0) {
if (is_subclass_of($this, 'TCPDF')) {
$args = func_get_args();
return call_user_func_array(array($this, 'TCPDF::Link'), $args);
diff -rupN ./lib/fpdi/fpdi2tcpdf_bridge.php /home/mauricio/Sites/sistema-de-ensino-2013/www/gasp/includes/libs/phpdocx/lib/fpdi/fpdi2tcpdf_bridge.php
--- ./lib/fpdi/fpdi2tcpdf_bridge.php 2014-01-13 10:43:12.000000000 -0200
+++ /home/mauricio/Sites/sistema-de-ensino-2013/www/gasp/includes/libs/phpdocx/lib/fpdi/fpdi2tcpdf_bridge.php 2014-01-13 14:38:22.411548504 -0200
@@ -28,7 +28,7 @@
*/
class FPDF extends TCPDF {

- function _putstream($s) {
+ function _putstream($s, $n = 0) {
$this->_out($this->_getstream($s));
}