The following modification will prevent the error message "Notice: Undefined property: classname" in your web application that generated with PHPMaker 9.0.1. For some unknown reasons you might get the error message from the website that generated with PHPMaker.
Notice Undefined property: classname::$sDisabled
Notice Undefined property: classname::$sSrchWhere
Notice Undefined property: classname::$sEmail
This error/notice message can be removed by simply implementing the following template customization. In other words, actually, there are some missing variable that belongs to the class that generated by PHPMaker 9.
We will customize the related template file for this purpose. Only small modification though, this will completely remove those three notice/error messages from your web application, especially if you display the error from your PHP service in your web server. This is very important in order to make your web application runs smoothly without any problem in all of your related generated pages.
Updated on May 30, 2012: This customization has been implemented in PHPMaker version 9.0.2, it matches to each other, and as a result, it works properly.
Updated on July 21, 2012: This customization has been implemented in PHPMaker version 9.0.3, it matches to each other, and as a result, it works properly.
Updated on September 4, 2012: This customization has been implemented in PHPMaker version 9.0.4, it matches to each other, and as a result, it works properly.
Updated on November 28, 2012: This customization has been implemented in PHPMaker version 9.1.0, it matches to each other, and as a result, it works properly.
Updated on February 9, 2013: This customization has been implemented in PHPMaker version 9.2.0, it matches to each other, and as a result, it works properly.
[hidepost]
-
Open your \Script\phpcommon-scripts.php file, and find this code:
class c<!--##=sPageObj##--> { <!--## } ##--> // Page ID var $PageID = '<!--##=sCtrlID##-->';after the last line of that code, please insert the following code:
var $sEmail = ''; // Added by Masino Sinaga, in order to prevent error undefined variable $sEmail, January 16, 2012 var $sSrchWhere = ''; // Added by Masino Sinaga, in order to prevent error undefined variable $sSrchWhere, January 16, 2012 var $sDisabled = ''; // Added by Masino Sinaga, in order to prevent error undefined variable $sDisabled, January 16, 2012 - Re-generate your related script files using PHPMaker as always.
[/hidepost]
[…] How to Prevent Error "Notice: Undefined property: classname" in Websites that Generated with PHPMake… […]