CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Strict Standards: Assigning the return value of new by reference is deprecated (resolved)

Print topic Send  topic

Author Message
dhempy


Posts: 40
Posted: 11/04/2008, 9:42 PM

I created a new project in CodeCharge Studio using PHP. I published the project, as generated, and got about a dozen instances of this PHP warning in the browser:

Strict Standards: Assigning the return value of new by reference is deprecated in programs_list.php on line 72

Line 72 is underlined below and copied here:
$this->Button_DoSearch = & new clsButton("Button_DoSearch", $Method, $this);


Any suggestions? I'm very surprised that the generated code generates deprecation warnings.

Thanks,
-dave


//Class_Initialize Event @2-D0C9ECEA
function clsRecordprogramsSearch($RelativePath, & $Parent)
{

global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->Visible = true;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Record programsSearch/Error";
$this->ReadAllowed = true;
if($this->Visible)
{
$this->ComponentName = "programsSearch";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$CCSForm = split(":", CCGetFromGet("ccsForm", ""), 2);
if(sizeof($CCSForm) == 1)
$CCSForm[1] = "";
list($FormName, $FormMethod) = $CCSForm;
$this->FormEnctype = "application/x-www-form-urlencoded";
$this->FormSubmitted = ($FormName == $this->ComponentName);
$Method = $this->FormSubmitted ? ccsPost : ccsGet;
$this->Button_DoSearch = & new clsButton("Button_DoSearch", $Method, $this);
$this->s_keyword = & new clsControl(ccsTextBox, "s_keyword", "s_keyword", ccsText, "", CCGetRequestParam("s_keyword", $Method, NULL), $this);
}
}
//End Class_Initialize Event
_________________
David Hempy
Director of Broadcast and Education Technology
Kentucky Educational Television
800-333-9764
View profile  Send private message
dhempy


Posts: 40
Posted: 11/05/2008, 12:09 PM

I should have included a bit more info in my original post...

We are running PHP Version 5.2.3 on Apache 2.0 on Windows Server.

The project currently only has a single page, a simple Grid, with no customization on my part. 100% stock.

The page DOES work...I get a list of my records in the grid, but the warnings precede the grid in the browser.

I'm not much of a PHP programmer. I'm guessing I can configure PHP to not show warnings, but that strikes me as a very backward solution to the problem. I think that other PHP programmers that I work with would object to not seeing warnings. (as do I)

Has anyone else run into this? Is there a way to configure CCS to generate warning-free code?


Thanks in advance for any pointers,
-dave

_________________
David Hempy
Director of Broadcast and Education Technology
Kentucky Educational Television
800-333-9764
View profile  Send private message
jjrjr1


Posts: 942
Posted: 11/05/2008, 12:21 PM

Hi

Did you try setting your project to generate php 5 code at the project level?

Do not know of any settings besides that which would affect code output.

Have you let Yes Customer Support know about this?

What version of CCS are you running.

Also it's easy to shut off the errors for that page

use

iniset("display_errors","off"); I think is the php command for that.

Let me know, I am curious about this.

Thanks

_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
dhempy


Posts: 40
Posted: 11/05/2008, 1:02 PM

Thanks for the follow-up, John!

Yes, I set it to "PHP4/PHP5 with Templates" when creating the project.

I am running CCS 4.1.00.027 ... the current version as of yesterday.

Umm...I thought I was letting Customer Support know by posting here. Do they monitor this forum? Ahh..I see now there is a trouble ticket system. I'll submit a ticket now.

I may try the iniset function you refer to...Thanks! I'd rather not suppress the warnings, but I'm not above it. I'll focus on other projects for a day, to see what Customer Support says. I'll follow up here with their reply.

-dave

_________________
David Hempy
Director of Broadcast and Education Technology
Kentucky Educational Television
800-333-9764
View profile  Send private message
jjrjr1


Posts: 942
Posted: 11/05/2008, 1:44 PM

I meant set it to php5 There is an option for that.

Anyway a support ticket is a good idea anyway.

Let me know what you find out.

Thanks

_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
dhempy


Posts: 40
Posted: 11/05/2008, 2:54 PM

BINGO! 8-)

That did the trick, John! Thanks for pointing that out -- I did not notice that option. I don't think it shows up during the wizards to create a new project, but it is an option once the project is created.

In case anyone else runs into this:

1. Click on the project in the Project Explorer.
2. Go to the Data tab of the Properties window.
3. Look for the PHP Version property and select 5.x

Thanks John,
-dave :-)

_________________
David Hempy
Director of Broadcast and Education Technology
Kentucky Educational Television
800-333-9764
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 11/05/2008, 4:08 PM

dhempy,
Please add [RESOLVED] or [SOLVED] to your thread title thanks. This is assuming that the answer that your problem was solved.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.