null

json_encode() turn non-UTF8 strings into null, but on live site returns false

♀尐吖头ヾ 提交于 2019-12-25 02:26:31
问题 In the framework I have to use for a project (Lithium) the output on a specific page goes through json_encode() . Locally and on live I try with one and the same data, and the result is: Locally it returns the JSON, but some of the values are turned into null . Live site - it returns false . In both cases when I run json_last_error() - it gives me int(5) . I can run phpinfo() on both places, if some setting is causing the problem. (Locally I'm with PHP 5.3.*, on live it's 5.5.9.) 回答1:

ExifInterface returns null for all Tags

余生长醉 提交于 2019-12-25 02:25:10
问题 I have a problem with my class, when i call .getMake(); it always returns null, so I get the string "No Data". I know that Uri is not null because i get ther first Toast every time, with the uripath. I also know that the image has the tag "TAG_MAKE" (I checked it). It even didn't work with all the other tags. What should I change? public class ExifE { private Uri uri; private ExifInterface exifI; private Context context; public ExifE(Context con) { context = con; SharedPreferences prefs =

AuthLogic UserSessions Controller Returning Nil [closed]

拥有回忆 提交于 2019-12-25 02:18:45
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . I've set up a new Rails app and am using Authlogic for authentication. I can happily CRUD users but there seems to be an issue with User Sessions. Error

[__NSArrayM insertObject:atIndex:]: object cannot be nil

只愿长相守 提交于 2019-12-25 01:46:03
问题 For some reason that I cannot find I am getting the following error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil' As I am quite new in xCode i'd like some help. The application crashes in the following line: [self.window makeKeyAndVisible]; in the ASAppDelegate.m file. The whole function is like this: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *

Silverlight 4 HttpWebRequest user agent string is null

Deadly 提交于 2019-12-25 00:42:52
问题 The problem I have a page with a silverlight object. It attempts to retrieve XML from another (external cross domain) page. But I am struggling with a security exception. I have this code working brilliantly in WPF. When using a website hosting a silverlight application with the same code, the user agent string of the HttpRequest object is null (and seemingly cannot be set). In fact there is no header information at all - this causes a security exception when attempting to make my

Parse XML File within Jar

[亡魂溺海] 提交于 2019-12-25 00:16:08
问题 I am having troubles loading an XML file within my java game. Here is where the file is located, (from Eclipse): I have been doing research, and apparently to use the xml file in a JAR file, I need to call DocumentBuilder.parse(InputStream) The problem is when I try to get the InputStream using getResourceAsStream("res/xml/items.xml") it always returns null. How could I make it not return null? I don't want to put my res folder inside of my "src" folder, but is there some setting in Eclipse

Gmail getElementById('canvas_frame') keeps returning null in Google Chrome

限于喜欢 提交于 2019-12-24 21:28:59
问题 i'm trying to write JavaScript code for a Gmail extension, and when I'm trying to get the canvas frame I, "getElementById" keeps returning the null value. Here is the code I'm using: var doc2 = document.getElementById('canvas_frame').contentDocument; I'm getting the following error: "Uncaught TypeError: Cannot read property 'contentDocument' of null" How can I solve this? 回答1: Because the iframe with ID canvas_frame does not need to exist in Gmail. To get a reference to the relevant document,

ORMLite column with default

99封情书 提交于 2019-12-24 20:12:52
问题 I have a non null column defined with a default: @DatabaseField(dataType = DataType.TIME_STAMP, columnDefinition = "DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL") private Date createdDate; When trying to save a row with the createdDate field unset, I get the following error: [SQLITE_CONSTRAINT_NOTNULL] A NOT NULL constraint failed (NOT NULL constraint failed: ORMLite is probably trying to explicitly insert a NULL value into the field. Adding persisted = false to the annotation avoids this, but

Coordinates.speed always returns as 'null'

我们两清 提交于 2019-12-24 19:36:54
问题 I am trying to develop a system where the particles on the background change their speed accordingly to the speed of the device (while you are in a car or bus, for example). For this, the Geolocation API sounded like a great option, with the Coordinates.speed property. The problem is that my speed is always returning as null . From what I've read, it should be a device-related issue, but I have tried with a Nexus 6p, a Mac, a Samsung tablet and an iPad, always with the same null answer in the

getArgument of NSInvocation of current method always returns null

为君一笑 提交于 2019-12-24 19:14:59
问题 I want to get the name of the arguments of the current function I am in so that I can prepare loading that object from the filesystem if it's not present on the current instance. (for instance if [foo dictTest] is not available I want to load it's prior saved plist version into exactly that ivar) I want to find the file by providing the ivar name that I provided as an argument to the current function. This is the function code: -(NSDictionary*)getCachedDictionary:(NSDictionary*)dict{