Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Error.js.php #195

Merged
merged 2 commits into from
Jul 26, 2017
Merged

Update Error.js.php #195

merged 2 commits into from
Jul 26, 2017

Conversation

plessbd
Copy link
Contributor

@plessbd plessbd commented Jul 26, 2017

Update to prevent warnings.
This allows the headers to be set before content is output.

Description

While testing on development system with warning enabled, this file ends up outputting warning preventing some functionality from happening correctly

Motivation and Context

To prevent warnings and make life better all around

Tests performed

went to
https://metrics-dev.ccr.buffalo.edu/gui/js/Error.js.php
utter sadness:

/** * Error.js.php * * Defines the error codes used by XDMoD. This file is generated from * server-side error code definitions in the PHP XDError class. */ Ext.namespace('XDMoD.Error');
( ! ) Warning: Cannot modify header information - headers already sent by (output started at /usr/share/xdmod/html/gui/js/Error.js.php:10) in /usr/share/xdmod/libraries/response.php on line 72
Call Stack
#	Time	Memory	Function	Location
1	0.0003	239672	{main}( )	../Error.js.php:0
2	0.0444	3803776	xd_response\useDynamicJavascriptHeaders( )	../Error.js.php:14
3	0.0444	3803984	header ( )	../response.php:72

( ! ) Warning: Cannot modify header information - headers already sent by (output started at /usr/share/xdmod/html/gui/js/Error.js.php:10) in /usr/share/xdmod/libraries/response.php on line 78
Call Stack
#	Time	Memory	Function	Location
1	0.0003	239672	{main}( )	../Error.js.php:0
2	0.0444	3803776	xd_response\useDynamicJavascriptHeaders( )	../Error.js.php:14
3	0.0445	3803984	header ( )	../response.php:78

( ! ) Warning: Cannot modify header information - headers already sent by (output started at /usr/share/xdmod/html/gui/js/Error.js.php:10) in /usr/share/xdmod/libraries/response.php on line 79
Call Stack
#	Time	Memory	Function	Location
1	0.0003	239672	{main}( )	../Error.js.php:0
2	0.0444	3803776	xd_response\useDynamicJavascriptHeaders( )	../Error.js.php:14
3	0.0446	3804032	header ( )	../response.php:79

( ! ) Warning: Cannot modify header information - headers already sent by (output started at /usr/share/xdmod/html/gui/js/Error.js.php:10) in /usr/share/xdmod/libraries/response.php on line 80
Call Stack
#	Time	Memory	Function	Location
1	0.0003	239672	{main}( )	../Error.js.php:0
2	0.0444	3803776	xd_response\useDynamicJavascriptHeaders( )	../Error.js.php:14
3	0.0446	3803984	header ( )	../response.php:80

( ! ) Warning: Cannot modify header information - headers already sent by (output started at /usr/share/xdmod/html/gui/js/Error.js.php:10) in /usr/share/xdmod/libraries/response.php on line 81
Call Stack
#	Time	Memory	Function	Location
1	0.0003	239672	{main}( )	../Error.js.php:0
2	0.0444	3803776	xd_response\useDynamicJavascriptHeaders( )	../Error.js.php:14
3	0.0447	3803984	header ( )	../response.php:81
XDMoD.Error.UnknownXdmodException = -1; XDMoD.Error.NotAuthenticated = 1; XDMoD.Error.SessionExpired = 2; XDMoD.Error.QueryException = 100; XDMoD.Error.QueryUnknownGroupBy = 101; XDMoD.Error.QueryUnavailableTimeAggregationUnit = 102; XDMoD.Error.QueryAccessDenied = 103; XDMoD.Error.QueryBadRequest = 104; XDMoD.Error.QueryNotFound = 105; XDMoD.Error.QueryMissingFilterListTable = 106; 

replaced file
YEAH!!!

/**
 * Error.js.php
 *
 * Defines the error codes used by XDMoD. This file is generated from
 * server-side error code definitions in the PHP XDError class.
 */

Ext.namespace('XDMoD.Error');

XDMoD.Error.UnknownXdmodException = -1;
XDMoD.Error.NotAuthenticated = 1;
XDMoD.Error.SessionExpired = 2;
XDMoD.Error.QueryException = 100;
XDMoD.Error.QueryUnknownGroupBy = 101;
XDMoD.Error.QueryUnavailableTimeAggregationUnit = 102;
XDMoD.Error.QueryAccessDenied = 103;
XDMoD.Error.QueryBadRequest = 104;
XDMoD.Error.QueryNotFound = 105;
XDMoD.Error.QueryMissingFilterListTable = 106;

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Update to prevent warnings.
This allows the headers to be set before content is output.
BE HAPPY I TELL YOU, BE HAPPY
@plessbd plessbd merged commit 723b55a into ubccr:xdmod7.0 Jul 26, 2017
@plessbd plessbd deleted the updateError.js.php branch July 26, 2017 17:39
@tyearke tyearke added the bug Bugfixes label Aug 14, 2017
@tyearke tyearke added this to the v7.0.0 milestone Aug 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugfixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants