Zend framework Undefined class constant '' in Zend/Db/Select.php - database

There is a srange error in my Apache Log :
PHP Fatal error: Undefined class constant ''
This is on line 814 of de library (Zend framework 1.11) library/Zend/Db/Select.php
A look of the code :
if ($type == self::FROM) {
// append this from after the last from joinType
$tmpFromParts = $this->_parts[self::FROM];
$this->_parts[self::FROM] = array();
// move all the froms onto the stack
while ($tmpFromParts) {
$currentCorrelationName = key($tmpFromParts);
if ($tmpFromParts[$currentCorrelationName]['joinType'] != self::FROM) {
break;
}
$lastFromCorrelationName = $currentCorrelationName;
$this->_parts[self::FROM][$currentCorrelationName] = array_shift($tmpFromParts);
} }
That's strange because the undefined constant is empty.
THis fatal error appears some times but not at every load of pages.
Is it a release BUG of the zend framework?

Related

Why does File.listFiles() throws NullPointerException on some devices?

Please pay attention to all the tests in the following code:
File folder = new File(sFolderPath);
if (folder == null) {
//do nothing
} else {
if (folder.exists()) {
File[] flist = folder.listFiles();
}
}
folder.listFiles() throws the following exception:
java.lang.NullPointerException: Attempt to get length of null array
It rarely happens. I am wondering how this can be possible after passing the tests of null and existence.

CN1: ios app crashes when showing picker component

My CN1 app crashes on iOS only (not on android).
With the native sources and xcode I found the error location:
The error comes up when a form is shown which includes a Picker-component.
In xcode I found that this line in my code is causing the error:
picker.setType(Display.PICKER_TYPE_STRINGS);
My code:
private boolean setPicker() {
picker.remove();
picker.setSelectedString(null);
picker.setType(Display.PICKER_TYPE_STRINGS);
String[] arr = RatingObject.getListAsStringArray();
if (arr.length > 0) {
gui_ro_Picker.setStrings(arr);
.....
Error:
Thread 5: EXC_BAD_ACCESS (code=1, address=0x0)
Code where the error appears:
#ifdef NEW_CODENAME_ONE_VM
JAVA_BOOLEAN com_codename1_impl_ios_IOSImplementation_instanceofObjArrayI___java_lang_Object_R_boolean(CN1_THREAD_STATE_MULTI_ARG JAVA_OBJECT n1)
{
// second part of the expression check that this isn't a primitive array
return n1->__codenameOneParentClsReference->isArray && cn1_array_start_offset + 100 < n1->__codenameOneParentClsReference->classId;
}
xcode marks explicitly the return line with the error
Do you have any advice on this?
Update:
Moving picker.setType(Display.PICKER_TYPE_STRINGS); into the constructor solved the issue.
For me moving picker.setType(Display.PICKER_TYPE_STRINGS) into the constructor solved this issue.
Thanks for the advices!

IE9 textangular issue

I'm receiving the following textangular error in IE9 or below.
unable to get the value of the property 'match': object is null or undefined textangular.js line 107 character 3
Here is the block of code that causes the error:
if(_browserDetect.ie > 8 || _browserDetect.ie === undefined){
var _sheets = document.styleSheets;
/* istanbul ignore next: preference for stylesheet loaded externally */
for(var i = 0; i < _sheets.length; i++){
if(_sheets[i].media.length === 0 || _sheets[i].media.mediaText.match(/(all|screen)/ig)){
if(_sheets[i].href){
if(_sheets[i].href.match(/textangular\.(min\.|)css/ig)){
sheet = _sheets[i];
break;
}
}
}
}
Line 107 is starts the first if block
TextAngular works correctly without error in all other browsers, just IE9 and below is returning the above error.

Markers and Windows(Angular google maps) not working after upgrade to angular 1.3.8

I have been using angular-google-maps for sometime. I have not faced any major issues till now. But one of my colleagues had upgraded angular to 1.3.8 recently. And since then I am getting the following errors while instantiating the and directives and I do not see any markers. Here are the errors I get. Any inputs or directions to debug will be awesome. Thanks in advance.
Here is the first error:
Error: this.mapCtrl.getMap is not a function
this.MarkersParentModel</MarkersParentModel.prototype.createMarkers#http://localhost/scripts/1b3f05c4.modules.js:2637:75
__bind/<#http://localhost/scripts/1b3f05c4.modules.js:2569:16
this.MarkersParentModel</MarkersParentModel.prototype.onTimeOut#http://localhost/scripts/1b3f05c4.modules.js:2612:16
__bind/<#http://localhost/scripts/1b3f05c4.modules.js:2569:16
__bind/<#http://localhost/scripts/1b3f05c4.modules.js:2234:16
IMarkerParentModel/<#http://localhost/scripts/1b3f05c4.modules.js:2290:11
timeout/timeoutId<#http://localhost/bower_components/angular/angular.js:16205:28
completeOutstandingRequest#http://localhost/bower_components/angular/angular.js:4902:7
Browser/self.defer/timeoutId<#http://localhost/bower_components/angular/angular.js:5282:7
http://localhost/bower_components/angular/angular.js
Line 11594
And here is the second error:
Error: this.linked.ctrls[0].getMap is not a function
this.WindowsParentModel</WindowsParentModel.prototype.createChildScopesWindows#http://localhost/scripts/1b3f05c4.modules.js:2860:21
__bind/<#http://localhost/scripts/1b3f05c4.modules.js:2726:16
WindowsParentModel/<#http://localhost/scripts/1b3f05c4.modules.js:2785:18
timeout/timeoutId<#http://localhost/bower_components/angular/angular.js:16205:28
completeOutstandingRequest#http://localhost/bower_components/angular/angular.js:4902:7
Browser/self.defer/timeoutId<#http://localhost/bower_components/angular/angular.js:5282:7
http://localhost/bower_components/angular/angular.js
Line 11594
Line 2860:
var markersScope, modelsNotDefined, _this = this;
this.isIconVisibleOnClick = true;
if (angular.isDefined(this.linked.attrs.isiconvisibleonclick)) {
this.isIconVisibleOnClick = this.linked.scope.isIconVisibleOnClick;
}
>>>> this.gMap = this.linked.ctrls[0].getMap();
markersScope = this.linked.ctrls.length > 1 && this.linked.ctrls[1] != null ? this.linked.ctrls[1].getMarkersScope() : void 0;
modelsNotDefined = angular.isUndefined(this.linked.scope.models);
if (modelsNotDefined && (markersScope === void 0 || markersScope.markerModels === void 0 && markersScope.models === void 0)) {
this.$log.info('No models to create windows from! Need direct models or models derrived from markers!');
return;
}
Line 2637:
this.gMarkerManager = new directives.api.managers.MarkerManager(this.mapCtrl.getMap());

change tracking in manager after saveChanges BreezeJs

I'm using Breeze and Angular on client and NHibernate on server.For business logic reasons I need to know if some object has changes after it has been saved.For that reasons I'm calling
manager.hasChanges(['ArrayOfTypes']);
In case when object is loaded from db it works as expected(returns true/false),
but after object is saved through
manager.saveChanges(['ArrayOfTypes']);
I get this error:
TypeError: Cannot read property 'hasChanges' of undefined
The error gets thrown here in breeze.js file:
proto._hasChangesCore = function(entityTypes) {
entityTypes = checkEntityTypes(this, entityTypes);
var entityGroups = getEntityGroups(this, entityTypes);
return entityGroups.some(function (eg) {
return eg.hasChanges();
});
};
I'm expecting 32 entityGroups to return and there are indeed 32 elements in array, but 25 of them are undefined.For now I've made a temp fix which does not feel right at all:
proto._hasChangesCore = function(entityTypes) {
entityTypes = checkEntityTypes(this, entityTypes);
var entityGroups = getEntityGroups(this, entityTypes);
return entityGroups.some(function (eg) {
if (eg !== undefined) {
return eg.hasChanges();
}
else {
return false;
}
});
};
Is there a way to deal with problem in other way?
Thanks
This happens when the one or more of the entity types is not represented by an EntityGroup in the entity manager. But you should be able to pass in any type name and not have it blow up.
This is a bug in Breeze, which is finally fixed. The fix will be in the next release.

Resources