replaced null with uninit_null()

Esse commit está contido em:
aalexandre
2013-03-14 17:32:56 -07:00
commit de Sara Golemon
commit 505c17f357
154 arquivos alterados com 760 adições e 756 exclusões
+1 -1
Ver Arquivo
@@ -452,7 +452,7 @@ Variant ScalarExpression::getVariant() const {
default:
assert(false);
}
return null;
return uninit_null();
}
bool ScalarExpression::getString(const std::string *&s) const {
+1 -1
Ver Arquivo
@@ -945,7 +945,7 @@ function php_escape_val($val) {
} else if ($val === false) {
return 'false';
} else if ($val === null) {
return 'null';
return 'uninit_null()';
} else {
return var_export($val, true);
}
+3 -3
Ver Arquivo
@@ -234,7 +234,7 @@ ArrayData *ArrayData::pop(Variant &value) {
value = getValue(pos);
return remove(getKey(pos), getCount() > 1);
}
value = null;
value = uninit_null();
return nullptr;
}
@@ -253,7 +253,7 @@ ArrayData *ArrayData::dequeue(Variant &value) {
return ret;
}
value = null;
value = uninit_null();
return nullptr;
}
@@ -372,7 +372,7 @@ Variant ArrayData::key() const {
if (m_pos >= 0 && m_pos < size()) {
return getKey(m_pos);
}
return null;
return uninit_null();
}
Variant ArrayData::value(ssize_t &pos) const {
+4 -4
Ver Arquivo
@@ -70,7 +70,7 @@ Variant ArrayUtil::Chunk(CArrRef input, int size,
bool preserve_keys /* = false */) {
if (size < 1) {
throw_invalid_argument("size: %d", size);
return null;
return uninit_null();
}
Array ret = Array::Create();
@@ -562,7 +562,7 @@ Variant ArrayUtil::RandomKeys(CArrRef input, int num_req /* = 1 */) {
if (num_req <= 0 || num_req > count) {
raise_warning("Second argument has to be between 1 and the "
"number of elements in the array");
return null;
return uninit_null();
}
std::vector<ssize_t> indices;
@@ -588,7 +588,7 @@ Variant ArrayUtil::RandomKeys(CArrRef input, int num_req /* = 1 */) {
Variant ArrayUtil::RandomValues(CArrRef input, int num_req /* = 1 */) {
int count = input.size();
if (num_req <= 0 || num_req > count) {
return null;
return uninit_null();
}
std::vector<ssize_t> indices;
@@ -772,7 +772,7 @@ Variant ArrayUtil::Map(CArrRef inputs, PFUNC_MAP map_function,
if (k < arr.size()) {
params.append(arr->getValueRef(positions[i][k]));
} else {
params.append(null);
params.append(uninit_null());
}
}
+4 -4
Ver Arquivo
@@ -390,7 +390,7 @@ Variant HphpArray::key() const {
}
return e->ikey;
}
return null;
return uninit_null();
}
Variant HphpArray::value(ssize_t& pos) const {
@@ -1407,7 +1407,7 @@ TypedValue* HphpArray::nvGet(const StringData* k) const {
ArrayData* HphpArray::nvNew(TypedValue*& ret, bool copy) {
HphpArray *a = this, *t = 0;
if (copy) a = t = copyImpl();
if (UNLIKELY(!a->nextInsert(null))) {
if (UNLIKELY(!a->nextInsert(uninit_null()))) {
ret = nullptr;
return t;
}
@@ -1620,7 +1620,7 @@ ArrayData* HphpArray::pop(Variant& value) {
: a->findForInsert(e->ikey);
a->erase(ei, true);
} else {
value = null;
value = uninit_null();
}
// To match PHP-like semantics, the pop operation resets the array's
// internal iterator.
@@ -1647,7 +1647,7 @@ ArrayData* HphpArray::dequeue(Variant& value) {
a->findForInsert(e->ikey));
a->compact(true);
} else {
value = null;
value = uninit_null();
}
// To match PHP-like semantics, the dequeue operation resets the array's
// internal iterator
+8 -8
Ver Arquivo
@@ -366,7 +366,7 @@ Variant vm_call_user_func(CVarRef function, CArrRef params,
const HPHP::VM::Func* f = vm_decode_function(function, cf(), forwarding,
obj, cls, invName);
if (f == nullptr) {
return null;
return uninit_null();
}
Variant ret;
g_vmContext->invokeFunc((TypedValue*)&ret, f, params, obj, cls,
@@ -401,12 +401,12 @@ Variant invoke_static_method(CStrRef s, CStrRef method, CArrRef params,
HPHP::VM::Class* class_ = VM::Unit::lookupClass(s.get());
if (class_ == nullptr) {
o_invoke_failed(s.data(), method.data(), fatal);
return null;
return uninit_null();
}
const HPHP::VM::Func* f = class_->lookupMethod(method.get());
if (f == nullptr || !(f->attrs() & HPHP::VM::AttrStatic)) {
o_invoke_failed(s.data(), method.data(), fatal);
return null;
return uninit_null();
}
Variant ret;
g_vmContext->invokeFunc((TypedValue*)&ret, f, params, nullptr, class_);
@@ -572,7 +572,7 @@ Variant throw_missing_arguments(const char *fn, int num, int level /* = 0 */) {
} else {
raise_warning("Missing argument %d for %s()", num, fn);
}
return null;
return uninit_null();
}
Variant throw_toomany_arguments(const char *fn, int num, int level /* = 0 */) {
@@ -581,7 +581,7 @@ Variant throw_toomany_arguments(const char *fn, int num, int level /* = 0 */) {
} else if (level == 1 || RuntimeOption::WarnTooManyArguments) {
raise_warning("Too many arguments for %s(), expected %d", fn, num);
}
return null;
return uninit_null();
}
Variant throw_wrong_arguments(const char *fn, int count, int cmin, int cmax,
@@ -593,7 +593,7 @@ Variant throw_wrong_arguments(const char *fn, int count, int cmin, int cmax,
return throw_toomany_arguments(fn, cmax, level);
}
assert(false);
return null;
return uninit_null();
}
void throw_missing_arguments_nr(const char *fn, int num, int level /* = 0 */) {
@@ -634,7 +634,7 @@ Variant throw_missing_typed_argument(const char *fn,
raise_error("Argument %d passed to %s() must be "
"an instance of %s, none given", arg, fn, type);
}
return null;
return uninit_null();
}
void throw_bad_type_exception(const char *fmt, ...) {
@@ -676,7 +676,7 @@ void throw_invalid_argument(const char *fmt, ...) {
Variant throw_fatal_unset_static_property(const char *s, const char *prop) {
raise_error("Attempt to unset static property %s::$%s", s, prop);
return null;
return uninit_null();
}
void check_request_timeout_info(ThreadInfo *info, int lc) {
+5 -5
Ver Arquivo
@@ -285,14 +285,14 @@ bool isset(CArrRef v, CVarRef offset);
bool isset(CArrRef v, litstr offset, bool isString = false);
bool isset(CArrRef v, CStrRef offset, bool isString = false);
inline Variant unset(Variant &v) { v.unset(); return null;}
inline Variant unset(CVarRef v) { return null;}
inline Variant setNull(Variant &v) { v.setNull(); return null;}
inline Variant unset(Variant &v) { v.unset(); return uninit_null();}
inline Variant unset(CVarRef v) { return uninit_null();}
inline Variant setNull(Variant &v) { v.setNull(); return uninit_null();}
inline Object setNull(Object &v) { v.reset(); return Object();}
inline Array setNull(Array &v) { v.reset(); return Array();}
inline String setNull(String &v) { v.reset(); return String();}
inline Variant unset(Object &v) { v.reset(); return null;}
inline Variant unset(Array &v) { v.reset(); return null;}
inline Variant unset(Object &v) { v.reset(); return uninit_null();}
inline Variant unset(Array &v) { v.reset(); return uninit_null();}
///////////////////////////////////////////////////////////////////////////////
// special variable contexts
+1 -1
Ver Arquivo
@@ -336,7 +336,7 @@ public:
return *(Object*)addr;
default:
assert(false);
return null;
return uninit_null();
}
}
+1 -1
Ver Arquivo
@@ -252,7 +252,7 @@ public:
/**
* Output buffering.
*/
void obStart(CVarRef handler = null);
void obStart(CVarRef handler = uninit_null());
String obCopyContents();
String obDetachContents();
int obGetContentLength();
+1 -1
Ver Arquivo
@@ -52,7 +52,7 @@ public:
bool keepRelative = false);
static String TranslateCommand(CStrRef cmd);
static Variant Open(CStrRef filename, CStrRef mode,
int options = 0, CVarRef context = null);
int options = 0, CVarRef context = uninit_null());
static bool IsVirtualDirectory(CStrRef filename);
static bool IsPlainFilePath(CStrRef filename);
+4 -4
Ver Arquivo
@@ -104,7 +104,7 @@ Variant UserFile::invoke(const VM::Func *func, CStrRef name,
// No explicitly defined function, no __call() magic method
// Give up.
if (!func && !m_Call) {
return null;
return uninit_null();
}
switch(g_vmContext->lookupObjMethod(func, m_cls, name.get())) {
@@ -133,18 +133,18 @@ Variant UserFile::invoke(const VM::Func *func, CStrRef name,
// We're not calling staticly, so this result is unhelpful
// Also, it's never produced by lookupObjMethod, so it'll
// never happen, but we must handle all enums
return null;
return uninit_null();
case MethodLookup::MethodFoundNoThis:
// Should never happen (Attr::Static check in ctor)
assert(false);
raise_error("%s::%s() must not be declared static",
m_cls->name()->data(), name.data());
return null;
return uninit_null();
}
NOT_REACHED();
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
+1 -1
Ver Arquivo
@@ -26,7 +26,7 @@ class UserFile : public File {
public:
DECLARE_OBJECT_ALLOCATION(UserFile);
UserFile(VM::Class *cls, int options = 0, CVarRef context = null);
UserFile(VM::Class *cls, int options = 0, CVarRef context = uninit_null());
virtual ~UserFile();
static StaticString s_class_name;
+19 -19
Ver Arquivo
@@ -290,7 +290,7 @@ inline Variant ObjectData::o_getImpl(CStrRef propName, int flags,
return o_getError(propName, context);
}
return null;
return uninit_null();
}
Variant ObjectData::o_get(CStrRef propName, bool error /* = true */,
@@ -317,7 +317,7 @@ Variant ObjectData::o_getPublic(CStrRef propName, bool error /* = true */) {
return o_getError(propName, null_string);
}
return null;
return uninit_null();
}
Variant ObjectData::o_getUnchecked(CStrRef propName,
@@ -612,7 +612,7 @@ Variant ObjectData::o_invoke(CStrRef s, CArrRef params,
if (!f) {
// Bail if we couldn't find the method or __call
o_invoke_failed(o_getClassName().data(), s.data(), fatal);
return null;
return uninit_null();
}
// We found __call! Stash the original name into invName.
assert(!(f->attrs() & HPHP::VM::AttrStatic));
@@ -678,7 +678,7 @@ Variant ObjectData::o_invoke_ex(CStrRef clsname, CStrRef s,
HPHP::VM::Class* cls = VM::Unit::lookupClass(clsname.get());
if (!cls || !getVMClass()->classof(cls)) {
o_invoke_failed(clsname.data(), s.data(), fatal);
return null;
return uninit_null();
}
StringData* invName = nullptr;
// XXX The lookup below doesn't take context into account, so it will lead
@@ -697,7 +697,7 @@ Variant ObjectData::o_invoke_ex(CStrRef clsname, CStrRef s,
if (!f) {
// Bail if we couldn't find the method or __call
o_invoke_failed(clsname.data(), s.data(), fatal);
return null;
return uninit_null();
}
// We found __call! Stash the original name into invName.
assert(!(f->attrs() & HPHP::VM::AttrStatic));
@@ -776,7 +776,7 @@ void ObjectData::serializeImpl(VariableSerializer *serializer) const {
handleSleep = const_cast<ObjectData*>(this)->php_sleep(ret);
} catch (...) {
raise_warning("%s::sleep() throws exception", o_getClassName().data());
ret = null;
ret = uninit_null();
handleSleep = true;
}
}
@@ -799,7 +799,7 @@ void ObjectData::serializeImpl(VariableSerializer *serializer) const {
} else {
raise_warning("\"%s\" returned as member variable from "
"__sleep() but does not exist", name.data());
wanted.set(name, null);
wanted.set(name, uninit_null());
}
}
serializer->setObjectInfo(o_getClassName(), o_getId(), 'O');
@@ -829,7 +829,7 @@ void ObjectData::serializeImpl(VariableSerializer *serializer) const {
raise_warning("serialize(): __sleep should return an array only "
"containing the names of instance-variables to "
"serialize");
null.serialize(serializer);
uninit_null().serialize(serializer);
}
}
} else {
@@ -862,11 +862,11 @@ ObjectData *ObjectData::clone() {
Variant ObjectData::o_getError(CStrRef prop, CStrRef context) {
raise_notice("Undefined property: %s::$%s", o_getClassName().data(),
prop.data());
return null;
return uninit_null();
}
Variant ObjectData::o_setError(CStrRef prop, CStrRef context) {
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
@@ -875,22 +875,22 @@ Variant ObjectData::o_setError(CStrRef prop, CStrRef context) {
Variant ObjectData::t___destruct() {
// do nothing
return null;
return uninit_null();
}
Variant ObjectData::t___call(Variant v_name, Variant v_arguments) {
// do nothing
return null;
return uninit_null();
}
Variant ObjectData::t___set(Variant v_name, Variant v_value) {
// not called
return null;
return uninit_null();
}
Variant ObjectData::t___get(Variant v_name) {
// not called
return null;
return uninit_null();
}
Variant *ObjectData::___lval(Variant v_name) {
@@ -902,7 +902,7 @@ Variant ObjectData::offsetGet(Variant key) {
const VM::Func* method = m_cls->lookupMethod(s_offsetGet.get());
assert(method);
if (!method) {
return null;
return uninit_null();
}
Variant v;
g_vmContext->invokeFunc((TypedValue*)(&v), method,
@@ -916,7 +916,7 @@ bool ObjectData::t___isset(Variant v_name) {
Variant ObjectData::t___unset(Variant v_name) {
// not called
return null;
return uninit_null();
}
bool ObjectData::o_propExists(CStrRef s, CStrRef context /* = null_string */) {
@@ -926,12 +926,12 @@ bool ObjectData::o_propExists(CStrRef s, CStrRef context /* = null_string */) {
Variant ObjectData::t___sleep() {
clearAttribute(HasSleep);
return null;
return uninit_null();
}
Variant ObjectData::t___wakeup() {
// do nothing
return null;
return uninit_null();
}
String ObjectData::t___tostring() {
@@ -942,7 +942,7 @@ String ObjectData::t___tostring() {
Variant ObjectData::t___clone() {
// do nothing
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
+4 -4
Ver Arquivo
@@ -225,7 +225,7 @@ void register_variable(Variant &variables, char *name, CVarRef value,
if (!index) {
symtable->append(Array::Create());
gpc_elements.push_back(null);
gpc_elements.push_back(uninit_null());
gpc_elements.back().assignRef(
symtable->lvalAt((int)symtable->toArray().size() - 1));
} else {
@@ -234,7 +234,7 @@ void register_variable(Variant &variables, char *name, CVarRef value,
if (v.isNull() || !v.is(KindOfArray)) {
symtable->set(key, Array::Create());
}
gpc_elements.push_back(null);
gpc_elements.push_back(uninit_null());
gpc_elements.back().assignRef(symtable->lvalAt(key));
}
symtable = &gpc_elements.back();
@@ -491,7 +491,7 @@ void execute_command_line_begin(int argc, char **argv, int xhprof) {
}
if (xhprof) {
f_xhprof_enable(xhprof, null);
f_xhprof_enable(xhprof, uninit_null());
}
}
@@ -1283,7 +1283,7 @@ ExecutionContext *hphp_context_init() {
bool hphp_invoke_simple(const std::string &filename,
bool warmupOnly /* = false */) {
bool error; string errorMsg;
return hphp_invoke(g_context.getNoCheck(), filename, false, null_array, null,
return hphp_invoke(g_context.getNoCheck(), filename, false, null_array, uninit_null(),
"", "", error, errorMsg, true, warmupOnly);
}
@@ -312,7 +312,7 @@ bool HttpRequestHandler::executePHPRequest(Transport *transport,
bool error = false;
std::string errorMsg = "Internal Server Error";
ret = hphp_invoke(context, file, false, Array(), null,
ret = hphp_invoke(context, file, false, Array(), uninit_null(),
RuntimeOption::RequestInitFunction,
RuntimeOption::RequestInitDocument,
error, errorMsg);
@@ -339,7 +339,7 @@ bool HttpRequestHandler::executePHPRequest(Transport *transport,
context->obEndAll();
context->obStart();
context->obProtect(true);
ret = hphp_invoke(context, errorPage, false, Array(), null,
ret = hphp_invoke(context, errorPage, false, Array(), uninit_null(),
RuntimeOption::RequestInitFunction,
RuntimeOption::RequestInitDocument,
error, errorMsg);
@@ -247,7 +247,7 @@ bool RPCRequestHandler::executePHPFunction(Transport *transport,
if (!forbidden) {
rpcFile = canonicalize_path(rpcFile, "", 0);
rpcFile = getSourceFilename(rpcFile, sourceRootInfo);
ret = hphp_invoke(m_context, rpcFile, false, Array(), null,
ret = hphp_invoke(m_context, rpcFile, false, Array(), uninit_null(),
reqInitFunc, reqInitDoc, error, errorMsg, runOnce);
}
// no need to do the initialization for a second time
+1 -1
Ver Arquivo
@@ -37,7 +37,7 @@ namespace HPHP {
Transport::Transport()
: m_instructions(0), m_url(nullptr), m_postData(nullptr), m_postDataParsed(false),
m_chunkedEncoding(false), m_headerSent(false),
m_headerCallback(null), m_headerCallbackDone(false),
m_headerCallback(uninit_null()), m_headerCallbackDone(false),
m_responseCode(-1), m_firstHeaderSet(false), m_firstHeaderLine(0),
m_responseSize(0), m_responseTotalSize(0), m_responseSentSize(0),
m_flushTimeUs(0), m_sendContentType(true),
+1 -1
Ver Arquivo
@@ -166,7 +166,7 @@ Array TimeZone::GetAbbreviations() {
if (entry->full_tz_name) {
element.set("timezone_id", String(entry->full_tz_name, AttachLiteral));
} else {
element.set("timezone_id", null);
element.set("timezone_id", uninit_null());
}
ret.lvalAt(entry->name).append(element);
+1 -1
Ver Arquivo
@@ -103,7 +103,7 @@ bool Object::more(CObjRef v2) const {
static Variant warn_non_object() {
raise_warning("Cannot access property on non-object");
return null;
return uninit_null();
}
Variant Object::o_get(CStrRef propName, bool error /* = true */,
+7 -7
Ver Arquivo
@@ -2399,7 +2399,7 @@ Variant &Variant::lvalAt() {
if (obj->isCollection()) {
raise_error("Cannot use [] for reading");
}
Array params = CREATE_VECTOR1(null);
Array params = CREATE_VECTOR1(uninit_null());
Variant& ret = lvalBlackHole();
ret = m_data.pobj->o_invoke(s_offsetGet, params);
raise_warning("Indirect modification of overloaded element of %s has "
@@ -2473,7 +2473,7 @@ Variant Variant::o_set(CStrRef propName, CVarRef val,
} else {
// Raise a warning
raise_warning("Attempt to assign property of non-object");
return null;
return uninit_null();
}
return m_data.pobj->o_set(propName, val, context);
}
@@ -2488,7 +2488,7 @@ Variant Variant::o_setRef(CStrRef propName, CVarRef val,
} else {
// Raise a warning
raise_warning("Attempt to assign property of non-object");
return null;
return uninit_null();
}
return m_data.pobj->o_setRef(propName, val, context);
}
@@ -2502,7 +2502,7 @@ Variant Variant::o_setPublic(CStrRef propName, CVarRef val) {
} else {
// Raise a warning
raise_warning("Attempt to assign property of non-object");
return null;
return uninit_null();
}
return m_data.pobj->o_setPublic(propName, val);
}
@@ -2516,7 +2516,7 @@ Variant Variant::o_setPublicRef(CStrRef propName, CVarRef val) {
} else {
// Raise a warning
raise_warning("Attempt to assign property of non-object");
return null;
return uninit_null();
}
return m_data.pobj->o_setPublicRef(propName, val);
}
@@ -2697,7 +2697,7 @@ CVarRef Variant::append(CVarRef v) {
if (LIKELY(obj->isCollection())) {
collectionOffsetAppend(obj, v);
} else {
Array params = CREATE_VECTOR2(null, v);
Array params = CREATE_VECTOR2(uninit_null(), v);
obj->o_invoke(s_offsetSet, params);
}
break;
@@ -2826,7 +2826,7 @@ CVarRef Variant::appendRef(CVarRef v) {
if (LIKELY(obj->isCollection())) {
raise_error("Collection elements cannot be taken by reference");
} else {
obj->o_invoke_few_args(s_offsetSet, -1, 2, null, v);
obj->o_invoke_few_args(s_offsetSet, -1, 2, uninit_null(), v);
}
}
case KindOfStaticString:
+4 -2
Ver Arquivo
@@ -72,8 +72,6 @@ class MutableArrayIter;
* pref strong x (pointer) x
*/
#define null ((Variant()))
#ifdef HHVM_GC
typedef GCRootTracker<Variant> VariantBase;
#else
@@ -1565,6 +1563,10 @@ inline const Variant Array::operator[](CVarRef key) const {
return rvalAt(key);
}
inline Variant uninit_null() {
return Variant();
}
///////////////////////////////////////////////////////////////////////////////
}
+1 -1
Ver Arquivo
@@ -66,7 +66,7 @@ void VariableUnserializer::read(char *buf, uint n) {
}
Variant &VariableUnserializer::addVar() {
m_vars.push_back(null);
m_vars.push_back(uninit_null());
return m_vars.back();
}
+1 -1
Ver Arquivo
@@ -350,7 +350,7 @@ static Variant collator_convert_object_to_string(CVarRef obj) {
if (U_FAILURE(status)) {
raise_warning("Error casting object to string in "
"collator_convert_object_to_string()");
return null;
return uninit_null();
}
return ustr;
}
+1 -1
Ver Arquivo
@@ -277,7 +277,7 @@ static inline void scan_set_error_return(int numVars, Variant &return_value) {
if (numVars) {
return_value = SCAN_ERROR_EOF; /* EOF marker */
} else {
return_value = null;
return_value = uninit_null();
}
}
+1 -1
Ver Arquivo
@@ -284,7 +284,7 @@ bool CmdMachine::onServer(DebuggerProxy *proxy) {
if (m_body == "rpc") {
String host = m_rpcConfig["host"].toString();
if (host.empty()) {
register_intercept("", false, null);
register_intercept("", false, uninit_null());
} else {
int port = m_rpcConfig["port"].toInt32();
LibEventHttpClient::SetCache(host.data(), port, 1);
+1 -1
Ver Arquivo
@@ -148,7 +148,7 @@ void CmdPrint::recvImpl(DebuggerThriftBuffer &thrift) {
thrift.read(sdata);
int error = DebuggerWireHelpers::WireUnserialize(sdata, m_ret);
if (error) {
m_ret = null;
m_ret = uninit_null();
}
if (error == DebuggerWireHelpers::HitLimit) {
m_wireError = "Hit unserialization limit. "
+1 -1
Ver Arquivo
@@ -347,7 +347,7 @@ Variant DebuggerProxy::ExecutePHP(const std::string &php, String &output,
if (log) {
Logger::SetThreadHook(append_stderr, &sb);
}
ret = null;
ret = uninit_null();
g_context->setStdout(nullptr, nullptr);
g_context->swapOutputBuffer(save);
if (log) {
+1 -1
Ver Arquivo
@@ -114,7 +114,7 @@ void DummySandbox::run() {
doc.c_str(), cwd);
bool error; string errorMsg;
bool ret = hphp_invoke(g_context.getNoCheck(), doc, false, null_array,
null, "", "", error, errorMsg, true, false,
uninit_null(), "", "", error, errorMsg, true, false,
true);
if (!ret || error) {
msg += "Unable to pre-load " + doc;
+1 -1
Ver Arquivo
@@ -395,7 +395,7 @@ static void json_create_zval(Variant &z, StringBuffer &buf, int type) {
z = (buf.data() && (*buf.data() == 't'));
break;
default:
z = null;
z = uninit_null();
break;
}
}
+4 -4
Ver Arquivo
@@ -422,7 +422,7 @@ void const_load_impl(struct cache_info *info,
switch (*v++) {
case 0: value = false; break;
case 1: value = true; break;
case 2: value = null; break;
case 2: value = uninit_null(); break;
default:
throw Exception("bad apc archive, unknown char type");
}
@@ -526,7 +526,7 @@ void apc_load_impl(struct cache_info *info,
switch (*v++) {
case 0: s.constructPrime(false, item); break;
case 1: s.constructPrime(true , item); break;
case 2: s.constructPrime(null , item); break;
case 2: s.constructPrime(uninit_null() , item); break;
default:
throw Exception("bad apc archive, unknown char type");
}
@@ -656,7 +656,7 @@ void const_load_impl_compressed
switch (*v++) {
case 0: value = false; break;
case 1: value = true; break;
case 2: value = null; break;
case 2: value = uninit_null(); break;
default:
throw Exception("bad const archive, unknown char type");
}
@@ -802,7 +802,7 @@ void apc_load_impl_compressed
switch (*v++) {
case 0: s.constructPrime(false, item); break;
case 1: s.constructPrime(true , item); break;
case 2: s.constructPrime(null , item); break;
case 2: s.constructPrime(uninit_null() , item); break;
default:
throw Exception("bad apc archive, unknown char type");
}
+6 -6
Ver Arquivo
@@ -173,7 +173,7 @@ TypedValue * fg1_apc_fetch(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count)
TypedValue * fg1_apc_fetch(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
tvCastToInt64InPlace(args-2);
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
fh_apc_fetch((rv), (args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1), (count > 2) ? (long)(args[-2].m_data.num) : (long)(0));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -185,7 +185,7 @@ TypedValue* fg_apc_fetch(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 1LL && count <= 3LL) {
if ((count <= 2 || (args-2)->m_type == KindOfInt64)) {
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
fh_apc_fetch((&(rv)), (args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1), (count > 2) ? (long)(args[-2].m_data.num) : (long)(0));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 3);
@@ -405,7 +405,7 @@ TypedValue * fg1_apc_inc(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_apc_inc((rv), (Value*)(args-0), (count > 1) ? (long)(args[-1].m_data.num) : (long)(1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (long)(args[-3].m_data.num) : (long)(0));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -417,7 +417,7 @@ TypedValue* fg_apc_inc(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 1LL && count <= 4LL) {
if ((count <= 3 || (args-3)->m_type == KindOfInt64) && (count <= 1 || (args-1)->m_type == KindOfInt64) && IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_apc_inc((&(rv)), (Value*)(args-0), (count > 1) ? (long)(args[-1].m_data.num) : (long)(1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (long)(args[-3].m_data.num) : (long)(0));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 4);
@@ -475,7 +475,7 @@ TypedValue * fg1_apc_dec(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_apc_dec((rv), (Value*)(args-0), (count > 1) ? (long)(args[-1].m_data.num) : (long)(1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (long)(args[-3].m_data.num) : (long)(0));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -487,7 +487,7 @@ TypedValue* fg_apc_dec(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 1LL && count <= 4LL) {
if ((count <= 3 || (args-3)->m_type == KindOfInt64) && (count <= 1 || (args-1)->m_type == KindOfInt64) && IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_apc_dec((&(rv)), (Value*)(args-0), (count > 1) ? (long)(args[-1].m_data.num) : (long)(1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (long)(args[-3].m_data.num) : (long)(0));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 4);
+5 -5
Ver Arquivo
@@ -27,11 +27,11 @@ namespace HPHP {
bool f_apc_add(CStrRef key, CVarRef var, int64_t ttl = 0, int64_t cache_id = 0);
bool f_apc_store(CStrRef key, CVarRef var, int64_t ttl = 0, int64_t cache_id = 0);
Variant f_apc_fetch(CVarRef key, VRefParam success = null, int64_t cache_id = 0);
Variant f_apc_fetch(CVarRef key, VRefParam success = uninit_null(), int64_t cache_id = 0);
Variant f_apc_delete(CVarRef key, int64_t cache_id = 0);
bool f_apc_clear_cache(int64_t cache_id = 0);
Variant f_apc_inc(CStrRef key, int64_t step = 1, VRefParam success = null, int64_t cache_id = 0);
Variant f_apc_dec(CStrRef key, int64_t step = 1, VRefParam success = null, int64_t cache_id = 0);
Variant f_apc_inc(CStrRef key, int64_t step = 1, VRefParam success = uninit_null(), int64_t cache_id = 0);
Variant f_apc_dec(CStrRef key, int64_t step = 1, VRefParam success = uninit_null(), int64_t cache_id = 0);
bool f_apc_cas(CStrRef key, int64_t old_cas, int64_t new_cas, int64_t cache_id = 0);
Variant f_apc_exists(CVarRef key, int64_t cache_id = 0);
@@ -68,10 +68,10 @@ inline bool f_apc_bin_load(CStrRef data, int64_t flags = 0, int64_t cache_id = 0
}
inline Variant f_apc_bin_dumpfile(int64_t cache_id, CVarRef filter,
CStrRef filename, int64_t flags = 0,
CObjRef context = null) {
CObjRef context = uninit_null()) {
throw NotSupportedException(__func__, "feature not supported");
}
inline bool f_apc_bin_loadfile(CStrRef filename, CObjRef context = null,
inline bool f_apc_bin_loadfile(CStrRef filename, CObjRef context = uninit_null(),
int64_t flags = 0, int64_t cache_id = 0) {
throw NotSupportedException(__func__, "feature not supported");
}
+9 -9
Ver Arquivo
@@ -74,7 +74,7 @@ using HPHP::VM::Transl::CallerFrame;
#define getCheckedArrayRet(input, fail) \
getCheckedArrayRetType(input, fail, CArrRef)
#define getCheckedArray(input) getCheckedArrayRet(input, null)
#define getCheckedArray(input) getCheckedArrayRet(input, uninit_null())
Variant f_array_change_key_case(CVarRef input, bool upper /* = false */) {
getCheckedArrayRet(input, false);
@@ -118,7 +118,7 @@ Variant f_array_filter(CVarRef input, CVarRef callback /* = null_variant */) {
ctx.func = vm_decode_function(callback, cf(), false, ctx.this_, ctx.cls,
ctx.invName);
if (ctx.func == NULL) {
return null;
return uninit_null();
}
return ArrayUtil::Filter(arr_input, filter_func, &ctx);
}
@@ -189,7 +189,7 @@ Variant f_array_map(int _argc, CVarRef callback, CVarRef arr1, CArrRef _argv /*
Array inputs;
if (!arr1.isArray()) {
throw_bad_array_exception();
return null;
return uninit_null();
}
inputs.append(arr1);
if (!_argv.empty()) {
@@ -255,7 +255,7 @@ Variant f_array_merge(int _argc, CVarRef array1,
Variant v = iter.second();
if (!v.isArray()) {
throw_bad_array_exception();
return null;
return uninit_null();
}
CArrRef arr_v = v.asCArrRef();
php_array_merge(ret, arr_v);
@@ -274,7 +274,7 @@ Variant f_array_merge_recursive(int _argc, CVarRef array1,
Variant v = iter.second();
if (!v.isArray()) {
throw_bad_array_exception();
return null;
return uninit_null();
}
CArrRef arr_v = v.asCArrRef();
php_array_merge_recursive(seen, false, ret, arr_v);
@@ -377,7 +377,7 @@ Variant f_array_product(CVarRef array) {
}
Variant f_array_push(int _argc, VRefParam array, CVarRef var, CArrRef _argv /* = null_array */) {
getCheckedArrayRetType(array, null, Array &);
getCheckedArrayRetType(array, uninit_null(), Array &);
arr_array.append(var);
for (ArrayIter iter(_argv); iter; ++iter) {
arr_array.append(iter.second());
@@ -406,7 +406,7 @@ Variant f_array_reduce(CVarRef input, CVarRef callback,
ctx.func = vm_decode_function(callback, cf(), false, ctx.this_, ctx.cls,
ctx.invName);
if (ctx.func == NULL) {
return null;
return uninit_null();
}
return ArrayUtil::Reduce(arr_input, reduce_func, &ctx, initial);
}
@@ -513,7 +513,7 @@ bool f_array_walk_recursive(VRefParam input, CVarRef funcname,
ctx.func = vm_decode_function(funcname, cf(), false, ctx.this_, ctx.cls,
ctx.invName);
if (ctx.func == NULL) {
return null;
return uninit_null();
}
PointerSet seen;
ArrayUtil::Walk(input, walk_func, &ctx, true, &seen, userdata);
@@ -530,7 +530,7 @@ bool f_array_walk(VRefParam input, CVarRef funcname,
ctx.func = vm_decode_function(funcname, cf(), false, ctx.this_, ctx.cls,
ctx.invName);
if (ctx.func == NULL) {
return null;
return uninit_null();
}
ArrayUtil::Walk(input, walk_func, &ctx, false, NULL, userdata);
return true;
+1 -1
Ver Arquivo
@@ -28,7 +28,7 @@ void c_Closure::t___construct() {}
Variant c_Closure::t___invoke(int _argc, CArrRef _argv) {
always_assert(false);
return null;
return uninit_null();
}
bool c_Closure::php_sleep(Variant &ret) {
+14 -14
Ver Arquivo
@@ -130,7 +130,7 @@ void c_Vector::t___construct(CVarRef iterable /* = null_variant */) {
}
Variant c_Vector::t___destruct() {
return null;
return uninit_null();
}
void c_Vector::grow() {
@@ -278,7 +278,7 @@ Variant c_Vector::t_at(CVarRef key) {
return tvAsCVarRef(at(key.toInt64()));
}
throwBadKeyType();
return null;
return uninit_null();
}
Variant c_Vector::t_get(CVarRef key) {
@@ -287,11 +287,11 @@ Variant c_Vector::t_get(CVarRef key) {
if (tv) {
return tvAsCVarRef(tv);
} else {
return null;
return uninit_null();
}
}
throwBadKeyType();
return null;
return uninit_null();
}
bool c_Vector::t_contains(CVarRef key) {
@@ -883,7 +883,7 @@ void c_Map::t___construct(CVarRef iterable /* = null_variant */) {
}
Variant c_Map::t___destruct() {
return null;
return uninit_null();
}
Array c_Map::toArrayImpl() const {
@@ -957,7 +957,7 @@ Variant c_Map::t_at(CVarRef key) {
return tvAsCVarRef(at(key.getStringData()));
}
throwBadKeyType();
return null;
return uninit_null();
}
Variant c_Map::t_get(CVarRef key) {
@@ -966,18 +966,18 @@ Variant c_Map::t_get(CVarRef key) {
if (tv) {
return tvAsCVarRef(tv);
} else {
return null;
return uninit_null();
}
} else if (key.isString()) {
TypedValue* tv = get(key.getStringData());
if (tv) {
return tvAsCVarRef(tv);
} else {
return null;
return uninit_null();
}
}
throwBadKeyType();
return null;
return uninit_null();
}
Object c_Map::t_set(CVarRef key, CVarRef value) {
@@ -1793,7 +1793,7 @@ void c_StableMap::t___construct(CVarRef iterable /* = null_variant */) {
}
Variant c_StableMap::t___destruct() {
return null;
return uninit_null();
}
Array c_StableMap::toArrayImpl() const {
@@ -1884,7 +1884,7 @@ Variant c_StableMap::t_at(CVarRef key) {
return tvAsCVarRef(at(key.getStringData()));
}
throwBadKeyType();
return null;
return uninit_null();
}
Variant c_StableMap::t_get(CVarRef key) {
@@ -1893,18 +1893,18 @@ Variant c_StableMap::t_get(CVarRef key) {
if (tv) {
return tvAsCVarRef(tv);
} else {
return null;
return uninit_null();
}
} else if (key.isString()) {
TypedValue* tv = get(key.getStringData());
if (tv) {
return tvAsCVarRef(tv);
} else {
return null;
return uninit_null();
}
}
throwBadKeyType();
return null;
return uninit_null();
}
Object c_StableMap::t_set(CVarRef key, CVarRef value) {
+5 -5
Ver Arquivo
@@ -61,10 +61,10 @@ class c_Vector : public ExtObjectDataFlags<ObjectData::VectorAttrInit|
public: bool t_contains(CVarRef key);
public: Object t_removeat(CVarRef key);
public: Array t_toarray();
public: void t_sort(CVarRef col = null);
public: void t_sort(CVarRef col = uninit_null());
public: void t_reverse();
public: void t_splice(CVarRef offset, CVarRef len = null,
CVarRef replacement = null);
public: void t_splice(CVarRef offset, CVarRef len = uninit_null(),
CVarRef replacement = uninit_null());
public: int64_t t_linearsearch(CVarRef search_value);
public: void t_shuffle();
public: Object t_getiterator();
@@ -82,9 +82,9 @@ class c_Vector : public ExtObjectDataFlags<ObjectData::VectorAttrInit|
return ti_fromvector("vector", vec);
}
public: static Variant ti_slice(const char* cls, CVarRef vec, CVarRef offset,
CVarRef len = null);
CVarRef len = uninit_null());
public: static Variant t_slice(CVarRef vec, CVarRef offset,
CVarRef len = null) {
CVarRef len = uninit_null()) {
return ti_slice("vector", vec, offset, len);
}
+2 -2
Ver Arquivo
@@ -199,7 +199,7 @@ String c_Continuation::t_getorigfuncname() {
Variant c_Continuation::t___clone() {
throw_fatal(
"Trying to clone an uncloneable object of class Continuation");
return null;
return uninit_null();
}
HphpArray* c_Continuation::getStaticLocals() {
@@ -250,7 +250,7 @@ void c_DummyContinuation::t___construct() {
Variant c_DummyContinuation::t_current() {
throw_fatal("Tring to use a DummyContinuation");
return null;
return uninit_null();
}
int64_t c_DummyContinuation::t_key() {
+1 -1
Ver Arquivo
@@ -47,7 +47,7 @@ class c_Continuation : public ExtObjectData {
// need to implement
public: c_Continuation(VM::Class* cls = c_Continuation::s_cls);
public: ~c_Continuation();
public: void t___construct(int64_t func, int64_t extra, bool isMethod, CStrRef origFuncName, CVarRef obj = null, CArrRef args = null_array);
public: void t___construct(int64_t func, int64_t extra, bool isMethod, CStrRef origFuncName, CVarRef obj = uninit_null(), CArrRef args = null_array);
public: void t_update(int64_t label, CVarRef value);
public: void t_done();
public: int64_t t_getlabel();
+6 -6
Ver Arquivo
@@ -604,7 +604,7 @@ public:
m_exception = e.clone();
m_phpException = false;
}
return null;
return uninit_null();
}
static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx) {
@@ -833,7 +833,7 @@ Variant f_curl_getinfo(CObjRef ch, int opt /* = 0 */) {
if (s_code != NULL) {
ret.set("content_type", String(s_code, CopyString));
} else {
ret.set("content_type", null);
ret.set("content_type", uninit_null());
}
}
if (curl_easy_getinfo(cp, CURLINFO_HTTP_CODE, &l_code) == CURLE_OK) {
@@ -961,7 +961,7 @@ Variant f_curl_getinfo(CObjRef ch, int opt /* = 0 */) {
}
}
return null;
return uninit_null();
}
Variant f_curl_errno(CObjRef ch) {
@@ -977,7 +977,7 @@ Variant f_curl_error(CObjRef ch) {
Variant f_curl_close(CObjRef ch) {
CHECK_RESOURCE(curl);
curl->close();
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
@@ -1083,7 +1083,7 @@ StaticString CurlMultiResource::s_class_name("cURL Multi Handle");
CurlMultiResource *curlm = mh.getTyped<CurlMultiResource>(true, true); \
if (curlm == NULL) { \
raise_warning("expects parameter 1 to be cURL multi resource"); \
return null; \
return uninit_null(); \
} \
Object f_curl_multi_init() {
@@ -1234,7 +1234,7 @@ Variant f_curl_multi_info_read(CObjRef mh,
Variant f_curl_multi_close(CObjRef mh) {
CHECK_MULTI_RESOURCE(curlm);
curlm->close();
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
+2 -2
Ver Arquivo
@@ -987,7 +987,7 @@ TypedValue * fg1_curl_multi_info_read(TypedValue* rv, HPHP::VM::ActRec* ar, int6
TypedValue * fg1_curl_multi_info_read(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
tvCastToObjectInPlace(args-0);
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
fh_curl_multi_info_read((rv), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -999,7 +999,7 @@ TypedValue* fg_curl_multi_info_read(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 1LL && count <= 2LL) {
if ((args-0)->m_type == KindOfObject) {
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
fh_curl_multi_info_read((&(rv)), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 2);
+1 -1
Ver Arquivo
@@ -46,7 +46,7 @@ Variant f_curl_multi_exec(CObjRef mh, VRefParam still_running);
Variant f_curl_multi_select(CObjRef mh, double timeout = 1.0);
Variant f_fb_curl_multi_fdset(CObjRef mh, VRefParam read_fd_set, VRefParam write_fd_set, VRefParam exc_fd_set, VRefParam max_fd = null_object);
Variant f_curl_multi_getcontent(CObjRef ch);
Variant f_curl_multi_info_read(CObjRef mh, VRefParam msgs_in_queue = null);
Variant f_curl_multi_info_read(CObjRef mh, VRefParam msgs_in_queue = uninit_null());
Variant f_curl_multi_close(CObjRef mh);
void f_evhttp_set_cache(CStrRef address, int max_conn, int port = 80);
Variant f_evhttp_get(CStrRef url, CArrRef headers = null_array, int timeout = 5);
+8 -8
Ver Arquivo
@@ -253,19 +253,19 @@ Variant c_DateInterval::t___get(Variant member) {
Variant c_DateInterval::t___set(Variant member, Variant value) {
if (member.isString()) {
if (member.same("y")) { m_di->setYears(value.toInt64()); return null; }
if (member.same("m")) { m_di->setMonths(value.toInt64()); return null; }
if (member.same("d")) { m_di->setDays(value.toInt64()); return null; }
if (member.same("h")) { m_di->setHours(value.toInt64()); return null; }
if (member.same("i")) { m_di->setMinutes(value.toInt64()); return null; }
if (member.same("s")) { m_di->setSeconds(value.toInt64()); return null; }
if (member.same("y")) { m_di->setYears(value.toInt64()); return uninit_null(); }
if (member.same("m")) { m_di->setMonths(value.toInt64()); return uninit_null(); }
if (member.same("d")) { m_di->setDays(value.toInt64()); return uninit_null(); }
if (member.same("h")) { m_di->setHours(value.toInt64()); return uninit_null(); }
if (member.same("i")) { m_di->setMinutes(value.toInt64()); return uninit_null(); }
if (member.same("s")) { m_di->setSeconds(value.toInt64()); return uninit_null(); }
if (member.same("invert")) {
m_di->setInverted(value.toBoolean());
return null;
return uninit_null();
}
if (member.same("days")) {
m_di->setTotalDays(value.toInt64());
return null;
return uninit_null();
}
}
+13 -13
Ver Arquivo
@@ -88,7 +88,7 @@ static DbgCltMap s_dbgCltMap;
// if the DebuggerClient with the same name is already in use, return null
Variant f_hphpd_get_client(CStrRef name /* = null */) {
if (name.empty()) {
return null;
return uninit_null();
}
DebuggerClient *client = NULL;
std::string nameStr = name->toCPPString();
@@ -102,7 +102,7 @@ Variant f_hphpd_get_client(CStrRef name /* = null */) {
}
if (!client->apiGrab()) {
// already grabbed by another request
return null;
return uninit_null();
}
}
p_DebuggerClient clt(NEWOBJ(c_DebuggerClient));
@@ -120,7 +120,7 @@ Variant f_hphpd_client_ctrl(CStrRef name, CStrRef op) {
return q_DebuggerClient$$STATE_INVALID;
} else {
raise_warning("client %s does not exist", name.data());
return null;
return uninit_null();
}
}
client = acc->second;
@@ -128,14 +128,14 @@ Variant f_hphpd_client_ctrl(CStrRef name, CStrRef op) {
if (op.equal("interrupt")) {
if (client->getClientState() < DebuggerClient::StateReadyForCommand) {
raise_warning("client is not initialized");
return null;
return uninit_null();
}
if (client->getClientState() != DebuggerClient::StateBusy) {
raise_warning("client is not in a busy state");
return null;
return uninit_null();
}
client->onSignal(SIGINT);
return null;
return uninit_null();
} else if (op.equal("getstate")) {
return client->getClientState();
} else if (op.equal("reset")) {
@@ -152,7 +152,7 @@ Variant f_hphpd_client_ctrl(CStrRef name, CStrRef op) {
raise_warning("unknown op %s", op.data());
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
@@ -479,19 +479,19 @@ Variant c_DebuggerClient::t_processcmd(CVarRef cmdName, CVarRef args) {
if (!m_client ||
m_client->getClientState() < DebuggerClient::StateReadyForCommand) {
raise_warning("client is not initialized");
return null;
return uninit_null();
}
if (m_client->getClientState() != DebuggerClient::StateReadyForCommand) {
raise_warning("client is not ready to take command");
return null;
return uninit_null();
}
if (!cmdName.isString()) {
raise_warning("cmdName must be string");
return null;
return uninit_null();
}
if (!args.isNull() && !args.isArray()) {
raise_warning("args must be null or array");
return null;
return uninit_null();
}
static const char *s_allowedCmds[] = {
@@ -513,7 +513,7 @@ Variant c_DebuggerClient::t_processcmd(CVarRef cmdName, CVarRef args) {
}
if (!allowed) {
raise_warning("unsupported command %s", cmdName.toString().data());
return null;
return uninit_null();
}
m_client->setCommand(cmdName.toString().data());
@@ -555,7 +555,7 @@ Variant c_DebuggerClient::t_processcmd(CVarRef cmdName, CVarRef args) {
return true;
} catch (DebuggerProtocolException &e) {
raise_warning("DebuggerProtocolException");
return null;
return uninit_null();
}
return m_client->getOutputArray();
+2 -2
Ver Arquivo
@@ -178,7 +178,7 @@ TypedValue * fg1_hphpd_get_client(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t
TypedValue * fg1_hphpd_get_client(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
tvCastToStringInPlace(args-0);
String defVal0 = null;
String defVal0 = uninit_null();
fh_hphpd_get_client((rv), (count > 0) ? (Value*)(args-0) : (Value*)(&defVal0));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -190,7 +190,7 @@ TypedValue* fg_hphpd_get_client(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count <= 1LL) {
if ((count <= 0 || IS_STRING_TYPE((args-0)->m_type))) {
String defVal0 = null;
String defVal0 = uninit_null();
fh_hphpd_get_client((&(rv)), (count > 0) ? (Value*)(args-0) : (Value*)(&defVal0));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 1);
+72 -72
Ver Arquivo
@@ -1171,7 +1171,7 @@ static Variant php_dom_create_object(xmlNodePtr obj, p_DOMDocument doc,
case XML_NOTATION_NODE: clsname = "domnotation"; break;
default:
raise_warning("Unsupported node type: %d", obj->type);
return null;
return uninit_null();
}
if (doc.get() && doc->m_classmap.exists(clsname)) {
@@ -1191,7 +1191,7 @@ static Variant php_dom_create_object(xmlNodePtr obj, p_DOMDocument doc,
static Variant create_node_object(xmlNodePtr node, p_DOMDocument doc,
bool owner = false) {
if (!node) {
return null;
return uninit_null();
}
Variant retval = php_dom_create_object(node, doc, owner);
if (retval.isNull()) {
@@ -1304,7 +1304,7 @@ static Variant php_xpath_eval(c_DOMXPath * domxpath, CStrRef expr,
ret = String((char*)xpathobjp->stringval, CopyString);
break;
default:
ret = null;
ret = uninit_null();
break;
}
xmlXPathFreeObject(xpathobjp);
@@ -1461,7 +1461,7 @@ static xmlNode *php_dom_libxml_notation_iter(xmlHashTable *ht, int index) {
Variant dummy_getter(CObjRef) {
raise_error("Cannot read property");
return null;
return uninit_null();
}
void dummy_setter(CObjRef,CVarRef) {
@@ -1522,7 +1522,7 @@ public:
xmlNodePtr nodep = domnode->m_node; \
if (nodep == NULL) { \
php_dom_throw_error(INVALID_STATE_ERR, 0); \
return null; \
return uninit_null(); \
} \
#define CHECK_WRITE_NODE(nodep) \
@@ -1612,7 +1612,7 @@ static Variant domnode_nodevalue_read(CObjRef obj) {
xmlFree(str);
return retval;
} else {
return null;
return uninit_null();
}
}
@@ -1661,7 +1661,7 @@ static Variant domnode_parentnode_read(CObjRef obj) {
static Variant domnode_childnodes_read(CObjRef obj) {
CHECK_NODE(nodep);
if (!dom_node_children_valid(nodep)) {
return null;
return uninit_null();
}
c_DOMNodeList *retval = NEWOBJ(c_DOMNodeList)();
retval->m_doc = domnode->doc();
@@ -1707,14 +1707,14 @@ static Variant domnode_attributes_read(CObjRef obj) {
nodemap->m_nodetype = XML_ATTRIBUTE_NODE;
return nodemap;
}
return null;
return uninit_null();
}
static Variant domnode_ownerdocument_read(CObjRef obj) {
CHECK_NODE(nodep);
if (nodep->type == XML_DOCUMENT_NODE ||
nodep->type == XML_HTML_DOCUMENT_NODE) {
return null;
return uninit_null();
}
return create_node_object((xmlNodePtr)nodep->doc, domnode->doc());
}
@@ -1736,7 +1736,7 @@ static Variant domnode_namespaceuri_read(CObjRef obj) {
if (str) {
return String(str, CopyString);
}
return null;
return uninit_null();
}
static Variant domnode_prefix_read(CObjRef obj) {
@@ -1829,7 +1829,7 @@ static Variant domnode_localname_read(CObjRef obj) {
nodep->type == XML_NAMESPACE_DECL) {
return String((char *)(nodep->name), CopyString);
}
return null;
return uninit_null();
}
static Variant domnode_baseuri_read(CObjRef obj) {
@@ -1840,7 +1840,7 @@ static Variant domnode_baseuri_read(CObjRef obj) {
xmlFree(baseuri);
return ret;
}
return null;
return uninit_null();
}
static Variant domnode_textcontent_read(CObjRef obj) {
@@ -1898,7 +1898,7 @@ Variant c_DOMNode::t___get(Variant name) {
Variant c_DOMNode::t___set(Variant name, Variant value) {
domnode_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMNode::t___isset(Variant name) {
@@ -2204,14 +2204,14 @@ Variant c_DOMNode::t_lookupnamespaceuri(CStrRef namespaceuri) {
nodep->type == XML_HTML_DOCUMENT_NODE) {
nodep = xmlDocGetRootElement((xmlDocPtr) nodep);
if (nodep == NULL) {
return null;
return uninit_null();
}
}
nsptr = xmlSearchNs(nodep->doc, nodep, (xmlChar*)namespaceuri.data());
if (nsptr && nsptr->href != NULL) {
return String((char *)nsptr->href, CopyString);
}
return null;
return uninit_null();
}
Variant c_DOMNode::t_lookupprefix(CStrRef prefix) {
@@ -2232,7 +2232,7 @@ Variant c_DOMNode::t_lookupprefix(CStrRef prefix) {
case XML_DOCUMENT_FRAG_NODE:
case XML_DOCUMENT_TYPE_NODE:
case XML_DTD_NODE:
return null;
return uninit_null();
default:
lookupp = nodep->parent;
}
@@ -2244,7 +2244,7 @@ Variant c_DOMNode::t_lookupprefix(CStrRef prefix) {
}
}
}
return null;
return uninit_null();
}
void c_DOMNode::t_normalize() {
@@ -2365,7 +2365,7 @@ Variant c_DOMNode::t_getnodepath() {
xmlFree(value);
return ret;
}
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
@@ -2375,7 +2375,7 @@ Variant c_DOMNode::t_getnodepath() {
xmlAttrPtr attrp = (xmlAttrPtr)domattr->m_node; \
if (attrp == NULL) { \
php_dom_throw_error(INVALID_STATE_ERR, 0); \
return null; \
return uninit_null(); \
} \
#define CHECK_WRITE_ATTR(attrp) \
@@ -2424,7 +2424,7 @@ static Variant domattr_ownerelement_read(CObjRef obj) {
static Variant domattr_schematypeinfo_read(CObjRef obj) {
raise_warning("Not yet implemented");
return null;
return uninit_null();
}
static PropertyAccessor domattr_properties[] = {
@@ -2466,7 +2466,7 @@ Variant c_DOMAttr::t___get(Variant name) {
Variant c_DOMAttr::t___set(Variant name, Variant value) {
domattr_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMAttr::t___isset(Variant name) {
@@ -2534,7 +2534,7 @@ Variant c_DOMCharacterData::t___get(Variant name) {
Variant c_DOMCharacterData::t___set(Variant name, Variant value) {
domcharacterdata_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMCharacterData::t___isset(Variant name) {
@@ -2745,7 +2745,7 @@ Variant c_DOMText::t___get(Variant name) {
Variant c_DOMText::t___set(Variant name, Variant value) {
domtext_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMText::t___isset(Variant name) {
@@ -2817,7 +2817,7 @@ void c_DOMCDATASection::t___construct(CStrRef value) {
xmlDocPtr docp = (xmlDocPtr)domdoc->m_node; \
if (docp == NULL) { \
php_dom_throw_error(INVALID_STATE_ERR, 0); \
return null; \
return uninit_null(); \
} \
#define CHECK_WRITE_DOC(docp) \
@@ -2848,7 +2848,7 @@ static Variant dom_document_encoding_read(CObjRef obj) {
if (encoding) {
return String(encoding, CopyString);
}
return null;
return uninit_null();
}
static void dom_document_encoding_write(CObjRef obj, CVarRef value) {
@@ -2892,7 +2892,7 @@ static Variant dom_document_version_read(CObjRef obj) {
if (version) {
return String(version, CopyString);
}
return null;
return uninit_null();
}
static void dom_document_version_write(CObjRef obj, CVarRef value) {
@@ -2929,7 +2929,7 @@ static Variant dom_document_document_uri_read(CObjRef obj) {
if (url) {
return String(url, CopyString);
}
return null;
return uninit_null();
}
static void dom_document_document_uri_write(CObjRef obj, CVarRef value) {
@@ -2942,7 +2942,7 @@ static void dom_document_document_uri_write(CObjRef obj, CVarRef value) {
}
static Variant dom_document_config_read(CObjRef obj) {
return null;
return uninit_null();
}
/* }}} */
@@ -3043,7 +3043,7 @@ Variant c_DOMDocument::t___get(Variant name) {
Variant c_DOMDocument::t___set(Variant name, Variant value) {
domdocument_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMDocument::t___isset(Variant name) {
@@ -3287,7 +3287,7 @@ Variant c_DOMDocument::t_getelementbyid(CStrRef elementid) {
ret->m_node = attrp->parent;
return ret;
}
return null;
return uninit_null();
}
Variant c_DOMDocument::t_getelementsbytagname(CStrRef name) {
@@ -3612,7 +3612,7 @@ bool c_DOMDocumentFragment::t_appendxml(CStrRef data) {
xmlDtdPtr dtdptr = (xmlDtdPtr)domdoctype->m_node; \
if (dtdptr == NULL) { \
php_dom_throw_error(INVALID_STATE_ERR, 0); \
return null; \
return uninit_null(); \
} \
static Variant dom_documenttype_name_read(CObjRef obj) {
@@ -3706,7 +3706,7 @@ Variant c_DOMDocumentType::t___get(Variant name) {
Variant c_DOMDocumentType::t___set(Variant name, Variant value) {
domdocumenttype_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMDocumentType::t___isset(Variant name) {
@@ -3731,7 +3731,7 @@ static Variant dom_element_tag_name_read(CObjRef obj) {
}
static Variant dom_element_schema_type_info_read(CObjRef obj) {
return null;
return uninit_null();
}
static PropertyAccessor domelement_properties[] = {
@@ -3817,7 +3817,7 @@ Variant c_DOMElement::t___get(Variant name) {
Variant c_DOMElement::t___set(Variant name, Variant value) {
domelement_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMElement::t___isset(Variant name) {
@@ -4020,7 +4020,7 @@ Variant c_DOMElement::t_removeattributens(CStrRef namespaceuri,
xmlNsPtr nsptr;
if (dom_node_is_read_only(nodep)) {
php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, doc()->m_stricterror);
return null;
return uninit_null();
}
attrp = xmlHasNsProp(nodep, (xmlChar*)localname.data(),
(xmlChar*)namespaceuri.data());
@@ -4036,7 +4036,7 @@ Variant c_DOMElement::t_removeattributens(CStrRef namespaceuri,
nsptr->prefix = NULL;
}
} else {
return null;
return uninit_null();
}
}
if (attrp && attrp->type != XML_ATTRIBUTE_DECL) {
@@ -4044,7 +4044,7 @@ Variant c_DOMElement::t_removeattributens(CStrRef namespaceuri,
xmlUnlinkNode((xmlNodePtr)attrp);
xmlFreeProp(attrp);
}
return null;
return uninit_null();
}
Variant c_DOMElement::t_setattribute(CStrRef name, CStrRef value) {
@@ -4126,7 +4126,7 @@ Variant c_DOMElement::t_setattributenode(CObjRef newattr) {
ret->m_node = (xmlNodePtr)existattrp;
return ret;
}
return null;
return uninit_null();
}
Variant c_DOMElement::t_setattributenodens(CObjRef newattr) {
@@ -4167,7 +4167,7 @@ Variant c_DOMElement::t_setattributenodens(CObjRef newattr) {
ret->m_node = (xmlNodePtr)existattrp;
return ret;
}
return null;
return uninit_null();
}
Variant c_DOMElement::t_setattributens(CStrRef namespaceuri, CStrRef name,
@@ -4185,7 +4185,7 @@ Variant c_DOMElement::t_setattributens(CStrRef namespaceuri, CStrRef name,
int stricterror = doc()->m_stricterror;
if (dom_node_is_read_only(elemp)) {
php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror);
return null;
return uninit_null();
}
errorcode = dom_check_qname((char*)name.data(), &localname, &prefix,
namespaceuri.size(), name.size());
@@ -4266,7 +4266,7 @@ Variant c_DOMElement::t_setattributens(CStrRef namespaceuri, CStrRef name,
if (errorcode != 0) {
php_dom_throw_error((dom_exception_code)errorcode, stricterror);
}
return null;
return uninit_null();
}
Variant c_DOMElement::t_setidattribute(CStrRef name, bool isid) {
@@ -4274,7 +4274,7 @@ Variant c_DOMElement::t_setidattribute(CStrRef name, bool isid) {
xmlAttrPtr attrp;
if (dom_node_is_read_only(nodep)) {
php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, doc()->m_stricterror);
return null;
return uninit_null();
}
attrp = xmlHasNsProp(nodep, (xmlChar*)name.data(), NULL);
if (attrp == NULL || attrp->type == XML_ATTRIBUTE_DECL) {
@@ -4282,7 +4282,7 @@ Variant c_DOMElement::t_setidattribute(CStrRef name, bool isid) {
} else {
php_set_attribute_id(attrp, isid);
}
return null;
return uninit_null();
}
Variant c_DOMElement::t_setidattributenode(CObjRef idattr, bool isid) {
@@ -4291,14 +4291,14 @@ Variant c_DOMElement::t_setidattributenode(CObjRef idattr, bool isid) {
xmlAttrPtr attrp = (xmlAttrPtr)domattr->m_node;
if (dom_node_is_read_only(nodep)) {
php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, doc()->m_stricterror);
return null;
return uninit_null();
}
if (attrp->parent != nodep) {
php_dom_throw_error(NOT_FOUND_ERR, doc()->m_stricterror);
} else {
php_set_attribute_id(attrp, isid);
}
return null;
return uninit_null();
}
Variant c_DOMElement::t_setidattributens(CStrRef namespaceuri,
@@ -4307,7 +4307,7 @@ Variant c_DOMElement::t_setidattributens(CStrRef namespaceuri,
xmlAttrPtr attrp;
if (dom_node_is_read_only(elemp)) {
php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, doc()->m_stricterror);
return null;
return uninit_null();
}
attrp = xmlHasNsProp(elemp, (xmlChar*)localname.data(),
(xmlChar*)namespaceuri.data());
@@ -4316,7 +4316,7 @@ Variant c_DOMElement::t_setidattributens(CStrRef namespaceuri,
} else {
php_set_attribute_id(attrp, isid);
}
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
@@ -4326,13 +4326,13 @@ Variant c_DOMElement::t_setidattributens(CStrRef namespaceuri,
xmlEntity *nodep = (xmlEntity*)domentity->m_node; \
if (nodep == NULL) { \
php_dom_throw_error(INVALID_STATE_ERR, 0); \
return null; \
return uninit_null(); \
} \
static Variant dom_entity_public_id_read(CObjRef obj) {
CHECK_ENTITY(nodep);
if (nodep->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
return null;
return uninit_null();
}
return String((char *)(nodep->ExternalID), CopyString);
}
@@ -4340,7 +4340,7 @@ static Variant dom_entity_public_id_read(CObjRef obj) {
static Variant dom_entity_system_id_read(CObjRef obj) {
CHECK_ENTITY(nodep);
if (nodep->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
return null;
return uninit_null();
}
return String((char *)(nodep->SystemID), CopyString);
}
@@ -4348,7 +4348,7 @@ static Variant dom_entity_system_id_read(CObjRef obj) {
static Variant dom_entity_notation_name_read(CObjRef obj) {
CHECK_ENTITY(nodep);
if (nodep->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
return null;
return uninit_null();
}
char *content = (char*)xmlNodeGetContent((xmlNodePtr) nodep);
String ret(content, CopyString);
@@ -4357,7 +4357,7 @@ static Variant dom_entity_notation_name_read(CObjRef obj) {
}
static Variant dom_entity_actual_encoding_read(CObjRef obj) {
return null;
return uninit_null();
}
static void dom_entity_actual_encoding_write(CObjRef obj, CVarRef value) {
@@ -4365,7 +4365,7 @@ static void dom_entity_actual_encoding_write(CObjRef obj, CVarRef value) {
}
static Variant dom_entity_encoding_read(CObjRef obj) {
return null;
return uninit_null();
}
static void dom_entity_encoding_write(CObjRef obj, CVarRef value) {
@@ -4373,7 +4373,7 @@ static void dom_entity_encoding_write(CObjRef obj, CVarRef value) {
}
static Variant dom_entity_version_read(CObjRef obj) {
return null;
return uninit_null();
}
static void dom_entity_version_write(CObjRef obj, CVarRef value) {
@@ -4412,7 +4412,7 @@ Variant c_DOMEntity::t___get(Variant name) {
Variant c_DOMEntity::t___set(Variant name, Variant value) {
domentity_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMEntity::t___isset(Variant name) {
@@ -4448,7 +4448,7 @@ void c_DOMEntityReference::t___construct(CStrRef name) {
xmlEntity *nodep = (xmlEntity*)domnotation->m_node; \
if (nodep == NULL) { \
php_dom_throw_error(INVALID_STATE_ERR, 0); \
return null; \
return uninit_null(); \
} \
static Variant dom_notation_public_id_read(CObjRef obj) {
@@ -4496,7 +4496,7 @@ Variant c_DOMNotation::t___get(Variant name) {
Variant c_DOMNotation::t___set(Variant name, Variant value) {
domnotation_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMNotation::t___isset(Variant name) {
@@ -4567,7 +4567,7 @@ Variant c_DOMProcessingInstruction::t___get(Variant name) {
Variant c_DOMProcessingInstruction::t___set(Variant name, Variant value) {
domprocessinginstruction_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMProcessingInstruction::t___isset(Variant name) {
@@ -4654,7 +4654,7 @@ Variant c_DOMNamedNodeMap::t_getnameditem(CStrRef name) {
}
return ret;
}
return null;
return uninit_null();
}
Variant c_DOMNamedNodeMap::t_getnameditemns(CStrRef namespaceuri,
@@ -4692,7 +4692,7 @@ Variant c_DOMNamedNodeMap::t_getnameditemns(CStrRef namespaceuri,
}
return ret;
}
return null;
return uninit_null();
}
Variant c_DOMNamedNodeMap::t_item(int64_t index) {
@@ -4731,7 +4731,7 @@ Variant c_DOMNamedNodeMap::t_item(int64_t index) {
}
}
return null;
return uninit_null();
}
Variant c_DOMNamedNodeMap::t___get(Variant name) {
@@ -4740,7 +4740,7 @@ Variant c_DOMNamedNodeMap::t___get(Variant name) {
Variant c_DOMNamedNodeMap::t___set(Variant name, Variant value) {
domnamednodemap_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMNamedNodeMap::t___isset(Variant name) {
@@ -4820,7 +4820,7 @@ Variant c_DOMNodeList::t___get(Variant name) {
Variant c_DOMNodeList::t___set(Variant name, Variant value) {
domnodelist_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMNodeList::t___isset(Variant name) {
@@ -5207,7 +5207,7 @@ Variant c_DOMXPath::t___get(Variant name) {
Variant c_DOMXPath::t___set(Variant name, Variant value) {
domxpath_properties_map.setter(name)(this, value);
return null;
return uninit_null();
}
bool c_DOMXPath::t___isset(Variant name) {
@@ -5249,7 +5249,7 @@ Variant c_DOMXPath::t_registerphpfunctions(CVarRef funcs /* = null */) {
} else {
m_registerPhpFunctions = 1;
}
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
@@ -5346,7 +5346,7 @@ Variant c_DOMNodeIterator::t_key() {
Variant c_DOMNodeIterator::t_next() {
if (m_iter) {
m_iter->next();
return null;
return uninit_null();
}
xmlNodePtr curnode = NULL;
@@ -5391,7 +5391,7 @@ err:
} else {
m_curobj.reset();
}
return null;
return uninit_null();
}
Variant c_DOMNodeIterator::t_rewind() {
@@ -5399,7 +5399,7 @@ Variant c_DOMNodeIterator::t_rewind() {
m_iter = NULL;
m_index = -1;
reset_iterator();
return null;
return uninit_null();
}
Variant c_DOMNodeIterator::t_valid() {
@@ -5418,11 +5418,11 @@ Variant c_DOMNodeIterator::t_valid() {
pobj = obj.toObject().getTyped<c_DOM ##name>(true, true); \
if (pobj == NULL) { \
raise_warning("Expecting dom " #name " object"); \
return null; \
return uninit_null(); \
} \
} else { \
raise_warning("Expecting dom objects in parameters"); \
return null; \
return uninit_null(); \
}
Variant f_dom_document_create_element(CVarRef obj, CStrRef name,
@@ -5503,7 +5503,7 @@ Variant f_dom_document_get_element_by_id(CVarRef obj, CStrRef elementid) {
Variant f_dom_document_normalize_document(CVarRef obj) {
DOM_GET_OBJ(Document);
pobj->t_normalizedocument();
return null;
return uninit_null();
}
Variant f_dom_document_save(CVarRef obj, CStrRef file,
@@ -5593,7 +5593,7 @@ Variant f_dom_node_clone_node(CVarRef obj, bool deep /* = false */) {
Variant f_dom_node_normalize(CVarRef obj) {
DOM_GET_OBJ(Node);
pobj->t_normalize();
return null;
return uninit_null();
}
Variant f_dom_node_is_supported(CVarRef obj, CStrRef feature,
+4 -4
Ver Arquivo
@@ -1341,7 +1341,7 @@ TypedValue * fg1_dom_node_insert_before(TypedValue* rv, HPHP::VM::ActRec* ar, in
if ((args-1)->m_type != KindOfObject) {
tvCastToObjectInPlace(args-1);
}
Object defVal2 = null;
Object defVal2 = uninit_null();
fh_dom_node_insert_before((rv), (args-0), (Value*)(args-1), (count > 2) ? (Value*)(args-2) : (Value*)(&defVal2));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -1353,7 +1353,7 @@ TypedValue* fg_dom_node_insert_before(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 2LL && count <= 3LL) {
if ((count <= 2 || (args-2)->m_type == KindOfObject) && (args-1)->m_type == KindOfObject) {
Object defVal2 = null;
Object defVal2 = uninit_null();
fh_dom_node_insert_before((&(rv)), (args-0), (Value*)(args-1), (count > 2) ? (Value*)(args-2) : (Value*)(&defVal2));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 3);
@@ -4055,7 +4055,7 @@ TypedValue* tg1_7DOMNode_insertBefore(TypedValue* rv, HPHP::VM::ActRec* ar, int6
if ((args-0)->m_type != KindOfObject) {
tvCastToObjectInPlace(args-0);
}
Object defVal1 = null;
Object defVal1 = uninit_null();
th_7DOMNode_insertBefore((rv), (this_), (Value*)(args-0), (count > 1) ? (Value*)(args-1) : (Value*)(&defVal1));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -4069,7 +4069,7 @@ TypedValue* tg_7DOMNode_insertBefore(HPHP::VM::ActRec *ar) {
if (this_) {
if (count >= 1LL && count <= 2LL) {
if ((count <= 1 || (args-1)->m_type == KindOfObject) && (args-0)->m_type == KindOfObject) {
Object defVal1 = null;
Object defVal1 = uninit_null();
th_7DOMNode_insertBefore((&(rv)), (this_), (Value*)(args-0), (count > 1) ? (Value*)(args-1) : (Value*)(&defVal1));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_inl(ar, 2);
+6 -6
Ver Arquivo
@@ -50,7 +50,7 @@ Variant f_dom_document_schema_validate_file(CVarRef obj, CStrRef filename);
Variant f_dom_document_schema_validate_xml(CVarRef obj, CStrRef source);
Variant f_dom_document_relaxng_validate_file(CVarRef obj, CStrRef filename);
Variant f_dom_document_relaxng_validate_xml(CVarRef obj, CStrRef source);
Variant f_dom_node_insert_before(CVarRef obj, CObjRef newnode, CObjRef refnode = null);
Variant f_dom_node_insert_before(CVarRef obj, CObjRef newnode, CObjRef refnode = uninit_null());
Variant f_dom_node_replace_child(CVarRef obj, CObjRef newchildobj, CObjRef oldchildobj);
Variant f_dom_node_remove_child(CVarRef obj, CObjRef node);
Variant f_dom_node_append_child(CVarRef obj, CObjRef newnode);
@@ -96,7 +96,7 @@ Variant f_dom_text_is_whitespace_in_element_content(CVarRef obj);
Variant f_dom_xpath_register_ns(CVarRef obj, CStrRef prefix, CStrRef uri);
Variant f_dom_xpath_query(CVarRef obj, CStrRef expr, CObjRef context = null_object);
Variant f_dom_xpath_evaluate(CVarRef obj, CStrRef expr, CObjRef context = null_object);
Variant f_dom_xpath_register_php_functions(CVarRef obj, CVarRef funcs = null);
Variant f_dom_xpath_register_php_functions(CVarRef obj, CVarRef funcs = uninit_null());
///////////////////////////////////////////////////////////////////////////////
// class DOMNode
@@ -115,7 +115,7 @@ class c_DOMNode : public ExtObjectDataFlags<ObjectData::UseGet|ObjectData::UseSe
public: int64_t t_getlineno();
public: bool t_hasattributes();
public: bool t_haschildnodes();
public: Variant t_insertbefore(CObjRef newnode, CObjRef refnode = null);
public: Variant t_insertbefore(CObjRef newnode, CObjRef refnode = uninit_null());
public: bool t_isdefaultnamespace(CStrRef namespaceuri);
public: bool t_issamenode(CObjRef node);
public: bool t_issupported(CStrRef feature, CStrRef version);
@@ -124,8 +124,8 @@ class c_DOMNode : public ExtObjectDataFlags<ObjectData::UseGet|ObjectData::UseSe
public: void t_normalize();
public: Variant t_removechild(CObjRef node);
public: Variant t_replacechild(CObjRef newchildobj, CObjRef oldchildobj);
public: Variant t_c14n(bool exclusive = false, bool with_comments = false, CVarRef xpath = null, CVarRef ns_prefixes = null);
public: Variant t_c14nfile(CStrRef uri, bool exclusive = false, bool with_comments = false, CVarRef xpath = null, CVarRef ns_prefixes = null);
public: Variant t_c14n(bool exclusive = false, bool with_comments = false, CVarRef xpath = uninit_null(), CVarRef ns_prefixes = uninit_null());
public: Variant t_c14nfile(CStrRef uri, bool exclusive = false, bool with_comments = false, CVarRef xpath = uninit_null(), CVarRef ns_prefixes = uninit_null());
public: Variant t_getnodepath();
public: Variant t___get(Variant name);
public: Variant t___set(Variant name, Variant value);
@@ -569,7 +569,7 @@ class c_DOMXPath : public ExtObjectDataFlags<ObjectData::UseGet|ObjectData::UseS
public: Variant t_evaluate(CStrRef expr, CObjRef context = null_object);
public: Variant t_query(CStrRef expr, CObjRef context = null_object);
public: bool t_registernamespace(CStrRef prefix, CStrRef uri);
public: Variant t_registerphpfunctions(CVarRef funcs = null);
public: Variant t_registerphpfunctions(CVarRef funcs = uninit_null());
public: Variant t___get(Variant name);
public: Variant t___set(Variant name, Variant value);
public: bool t___isset(Variant name);
+1 -1
Ver Arquivo
@@ -31,7 +31,7 @@ void f_debug_print_backtrace();
String debug_string_backtrace(bool skip);
Array f_error_get_last();
bool f_error_log(CStrRef message, int message_type = 0, CStrRef destination = null_string, CStrRef extra_headers = null_string);
int64_t f_error_reporting(CVarRef level = null);
int64_t f_error_reporting(CVarRef level = uninit_null());
bool f_restore_error_handler();
bool f_restore_exception_handler();
Variant f_set_error_handler(CVarRef error_handler, int error_types = k_E_ALL);
+7 -7
Ver Arquivo
@@ -267,7 +267,7 @@ int fb_unserialize_from_buffer(Variant &res, const char *buff,
int type;
switch (type = buff[(*pos)++]) {
case T_NULL:
res = null;
res = uninit_null();
break;
case T_BOOLEAN:
CHECK_ENOUGH(sizeof(int8_t), *pos, buff_len);
@@ -417,7 +417,7 @@ int fb_unserialize_from_buffer(Variant &res, const char *buff,
Variant f_fb_thrift_serialize(CVarRef thing) {
int len;
if (fb_serialized_size(thing, 0, &len)) {
return null;
return uninit_null();
}
String s(len, ReserveString);
int pos = 0;
@@ -429,7 +429,7 @@ Variant f_fb_thrift_serialize(CVarRef thing) {
Variant fb_thrift_unserialize(const char* str, int len, VRefParam success,
VRefParam errcode /* = null_variant */) {
int pos = 0;
errcode = null;
errcode = uninit_null();
int errcd;
Variant ret;
success = false;
@@ -789,7 +789,7 @@ Variant f_fb_compact_serialize(CVarRef thing) {
// so no need to check for length.
if (fb_compact_serialize_variant(sd, thing, 0)) {
DELETE(StringData)(sd);
return null;
return uninit_null();
}
return Variant(sd);
@@ -876,7 +876,7 @@ int fb_compact_unserialize_from_buffer(
code &= kCodeMask;
switch (code) {
case FB_CS_NULL:
out = null;
out = uninit_null();
break;
case FB_CS_TRUE:
@@ -1002,7 +1002,7 @@ Variant fb_compact_unserialize(const char* str, int len,
return false;
}
success = true;
errcode = null;
errcode = uninit_null();
return ret;
}
@@ -1516,7 +1516,7 @@ Array f_fb_call_user_func_array_safe(CVarRef function, CArrRef params) {
if (f_is_callable(function)) {
return CREATE_VECTOR2(true, f_call_user_func_array(function, params));
}
return CREATE_VECTOR2(false, null);
return CREATE_VECTOR2(false, uninit_null());
}
///////////////////////////////////////////////////////////////////////////////
+2 -2
Ver Arquivo
@@ -1283,7 +1283,7 @@ TypedValue * fg1_flock(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
if ((args-0)->m_type != KindOfObject) {
tvCastToObjectInPlace(args-0);
}
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
rv->m_data.num = (fh_flock((Value*)(args-0), (int)(args[-1].m_data.num), (count > 2) ? (args-2) : (TypedValue*)(&defVal2))) ? 1LL : 0LL;
return rv;
}
@@ -1295,7 +1295,7 @@ TypedValue* fg_flock(HPHP::VM::ActRec *ar) {
if (count >= 2LL && count <= 3LL) {
if ((args-1)->m_type == KindOfInt64 && (args-0)->m_type == KindOfObject) {
rv.m_type = KindOfBoolean;
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
rv.m_data.num = (fh_flock((Value*)(args-0), (int)(args[-1].m_data.num), (count > 2) ? (args-2) : (TypedValue*)(&defVal2))) ? 1LL : 0LL;
frame_free_locals_no_this_inl(ar, 3);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
+13 -13
Ver Arquivo
@@ -32,7 +32,7 @@ namespace HPHP {
// file handle based file operations
Variant f_fopen(CStrRef filename, CStrRef mode, bool use_include_path = false,
CVarRef context = null);
CVarRef context = uninit_null());
Variant f_popen(CStrRef command, CStrRef mode);
bool f_fclose(CObjRef handle);
Variant f_pclose(CObjRef handle);
@@ -54,7 +54,7 @@ Variant f_fprintf(int _argc, CObjRef handle, CStrRef format, CArrRef _argv = nul
Variant f_vfprintf(CObjRef handle, CStrRef format, CArrRef args);
bool f_fflush(CObjRef handle);
bool f_ftruncate(CObjRef handle, int64_t size);
bool f_flock(CObjRef handle, int operation, VRefParam wouldblock = null);
bool f_flock(CObjRef handle, int operation, VRefParam wouldblock = uninit_null());
Variant f_fputcsv(CObjRef handle, CArrRef fields, CStrRef delimiter = ",",
CStrRef enclosure = "\"");
Variant f_fgetcsv(CObjRef handle, int64_t length = 0, CStrRef delimiter = ",",
@@ -64,13 +64,13 @@ Variant f_fgetcsv(CObjRef handle, int64_t length = 0, CStrRef delimiter = ",",
// file name based file operations
Variant f_file_get_contents(CStrRef filename, bool use_include_path = false,
CVarRef context = null, int64_t offset = 0,
CVarRef context = uninit_null(), int64_t offset = 0,
int64_t maxlen = 0);
Variant f_file_put_contents(CStrRef filename, CVarRef data, int flags = 0,
CVarRef context = null);
Variant f_file(CStrRef filename, int flags = 0, CVarRef context = null);
CVarRef context = uninit_null());
Variant f_file(CStrRef filename, int flags = 0, CVarRef context = uninit_null());
Variant f_readfile(CStrRef filename, bool use_include_path = false,
CVarRef context = null);
CVarRef context = uninit_null());
bool f_move_uploaded_file(CStrRef filename, CStrRef destination);
Variant f_parse_ini_file(CStrRef filename, bool process_sections = false,
int scanner_mode = k_INI_SCANNER_NORMAL);
@@ -92,10 +92,10 @@ bool f_lchown(CStrRef filename, CVarRef user);
bool f_chgrp(CStrRef filename, CVarRef group);
bool f_lchgrp(CStrRef filename, CVarRef group);
bool f_touch(CStrRef filename, int64_t mtime = 0, int64_t atime = 0);
bool f_copy(CStrRef source, CStrRef dest, CVarRef context = null);
bool f_rename(CStrRef oldname, CStrRef newname, CVarRef context = null);
bool f_copy(CStrRef source, CStrRef dest, CVarRef context = uninit_null());
bool f_rename(CStrRef oldname, CStrRef newname, CVarRef context = uninit_null());
int64_t f_umask(CVarRef mask = null_variant);
bool f_unlink(CStrRef filename, CVarRef context = null);
bool f_unlink(CStrRef filename, CVarRef context = uninit_null());
bool f_link(CStrRef target, CStrRef link);
bool f_symlink(CStrRef target, CStrRef link);
String f_basename(CStrRef path, CStrRef suffix = null_string);
@@ -141,18 +141,18 @@ Variant f_disk_total_space(CStrRef directory);
// directory functions
bool f_mkdir(CStrRef pathname, int64_t mode = 0777, bool recursive = false,
CVarRef context = null);
bool f_rmdir(CStrRef dirname, CVarRef context = null);
CVarRef context = uninit_null());
bool f_rmdir(CStrRef dirname, CVarRef context = uninit_null());
String f_dirname(CStrRef path);
Variant f_getcwd();
bool f_chdir(CStrRef directory);
bool f_chroot(CStrRef directory);
Variant f_dir(CStrRef directory);
Variant f_opendir(CStrRef path, CVarRef context = null);
Variant f_opendir(CStrRef path, CVarRef context = uninit_null());
Variant f_readdir(CObjRef dir_handle);
void f_rewinddir(CObjRef dir_handle);
Variant f_scandir(CStrRef directory, bool descending = false,
CVarRef context = null);
CVarRef context = uninit_null());
void f_closedir(CObjRef dir_handle);
///////////////////////////////////////////////////////////////////////////////
+2 -2
Ver Arquivo
@@ -141,14 +141,14 @@ Object f_call_user_func_async(int _argc, CVarRef function,
Variant f_check_user_func_async(CVarRef handles, int timeout /* = -1 */) {
raise_error("%s is no longer supported", __func__);
return null;
return uninit_null();
}
Variant f_end_user_func_async(CObjRef handle,
int default_strategy /* = k_GLOBAL_STATE_IGNORE */,
CVarRef additional_strategies /* = null */) {
raise_error("%s is no longer supported", __func__);
return null;
return uninit_null();
}
String f_call_user_func_serialized(CStrRef input) {
+2 -2
Ver Arquivo
@@ -135,7 +135,7 @@ TypedValue * fg1_is_callable(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
rv->m_type = KindOfBoolean;
tvCastToBooleanInPlace(args-1);
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
rv->m_data.num = (fh_is_callable((args-0), (count > 1) ? (bool)(args[-1].m_data.num) : (bool)(false), (count > 2) ? (args-2) : (TypedValue*)(&defVal2))) ? 1LL : 0LL;
return rv;
}
@@ -147,7 +147,7 @@ TypedValue* fg_is_callable(HPHP::VM::ActRec *ar) {
if (count >= 1LL && count <= 3LL) {
if ((count <= 1 || (args-1)->m_type == KindOfBoolean)) {
rv.m_type = KindOfBoolean;
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
rv.m_data.num = (fh_is_callable((args-0), (count > 1) ? (bool)(args[-1].m_data.num) : (bool)(false), (count > 2) ? (args-2) : (TypedValue*)(&defVal2))) ? 1LL : 0LL;
frame_free_locals_no_this_inl(ar, 3);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
+2 -2
Ver Arquivo
@@ -26,12 +26,12 @@ namespace HPHP {
Array f_get_defined_functions();
bool f_function_exists(CStrRef function_name, bool autoload = true);
bool f_is_callable(CVarRef v, bool syntax = false,
VRefParam name = null);
VRefParam name = uninit_null());
Variant f_call_user_func(int _argc, CVarRef function, CArrRef _argv = null_array);
Object f_call_user_func_array_async(CVarRef function, CArrRef params);
Object f_call_user_func_async(int _argc, CVarRef function, CArrRef _argv = null_array);
Variant f_check_user_func_async(CVarRef handles, int timeout = -1);
Variant f_end_user_func_async(CObjRef handle, int default_strategy = k_GLOBAL_STATE_IGNORE, CVarRef additional_strategies = null);
Variant f_end_user_func_async(CObjRef handle, int default_strategy = k_GLOBAL_STATE_IGNORE, CVarRef additional_strategies = uninit_null());
String f_call_user_func_serialized(CStrRef input);
Variant f_call_user_func_array_rpc(CStrRef host, int port, CStrRef auth, int timeout, CVarRef function, CArrRef params);
Variant f_call_user_func_rpc(int _argc, CStrRef host, int port, CStrRef auth, int timeout, CVarRef function, CArrRef _argv = null_array);
+2 -2
Ver Arquivo
@@ -485,7 +485,7 @@ TypedValue * fg1_hash_update_file(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t
if ((args-0)->m_type != KindOfObject) {
tvCastToObjectInPlace(args-0);
}
Object defVal2 = null;
Object defVal2 = uninit_null();
rv->m_data.num = (fh_hash_update_file((Value*)(args-0), (Value*)(args-1), (count > 2) ? (Value*)(args-2) : (Value*)(&defVal2))) ? 1LL : 0LL;
return rv;
}
@@ -497,7 +497,7 @@ TypedValue* fg_hash_update_file(HPHP::VM::ActRec *ar) {
if (count >= 2LL && count <= 3LL) {
if ((count <= 2 || (args-2)->m_type == KindOfObject) && IS_STRING_TYPE((args-1)->m_type) && (args-0)->m_type == KindOfObject) {
rv.m_type = KindOfBoolean;
Object defVal2 = null;
Object defVal2 = uninit_null();
rv.m_data.num = (fh_hash_update_file((Value*)(args-0), (Value*)(args-1), (count > 2) ? (Value*)(args-2) : (Value*)(&defVal2))) ? 1LL : 0LL;
frame_free_locals_no_this_inl(ar, 3);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
+1 -1
Ver Arquivo
@@ -32,7 +32,7 @@ Variant f_hash_file(CStrRef algo, CStrRef filename, bool raw_output = false);
String f_hash_final(CObjRef context, bool raw_output = false);
Variant f_hash_hmac_file(CStrRef algo, CStrRef filename, CStrRef key, bool raw_output = false);
Variant f_hash_hmac(CStrRef algo, CStrRef data, CStrRef key, bool raw_output = false);
bool f_hash_update_file(CObjRef init_context, CStrRef filename, CObjRef stream_context = null);
bool f_hash_update_file(CObjRef init_context, CStrRef filename, CObjRef stream_context = uninit_null());
int64_t f_hash_update_stream(CObjRef context, CObjRef handle, int length = -1);
bool f_hash_update(CObjRef context, CStrRef data);
int64_t f_furchash_hphp_ext(CStrRef key, int len, int nPart);
+8 -8
Ver Arquivo
@@ -1545,7 +1545,7 @@ public:
return ret;
}
return null;
return uninit_null();
}
/**
@@ -1587,7 +1587,7 @@ Variant f_hotprofiler_disable() {
#ifdef HOTPROFILER
return s_factory->stop();
#else
return null;
return uninit_null();
#endif
}
@@ -1601,7 +1601,7 @@ Variant f_phprof_disable() {
#ifdef HOTPROFILER
return s_factory->stop();
#else
return null;
return uninit_null();
#endif
}
@@ -1661,7 +1661,7 @@ Variant f_xhprof_disable() {
#ifdef HOTPROFILER
return s_factory->stop();
#else
return null;
return uninit_null();
#endif
}
@@ -1683,7 +1683,7 @@ Variant f_xhprof_sample_disable() {
#ifdef HOTPROFILER
return s_factory->stop();
#else
return null;
return uninit_null();
#endif
}
@@ -1697,7 +1697,7 @@ Variant f_xhprof_run_trace(CStrRef packedTrace, int flags) {
int MHz;
if (sscanf(syms, xhprof_trace_speed, &MHz) != 1) {
return null;
return uninit_null();
}
vector<char *>symbols;
@@ -1720,7 +1720,7 @@ Variant f_xhprof_run_trace(CStrRef packedTrace, int flags) {
toup->symbol.ptr = NULL;
} else {
// corrupt trace
return null;
return uninit_null();
}
}
@@ -1731,7 +1731,7 @@ Variant f_xhprof_run_trace(CStrRef packedTrace, int flags) {
Profiler::extractStats(result, stats, flags, MHz);
return result;
#else
return null;
return uninit_null();
#endif
}
+2 -2
Ver Arquivo
@@ -56,7 +56,7 @@ TypedValue * fg1_icu_match(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count)
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_icu_match((rv), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (long)(args[-3].m_data.num) : (long)(0));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -68,7 +68,7 @@ TypedValue* fg_icu_match(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 2LL && count <= 4LL) {
if ((count <= 3 || (args-3)->m_type == KindOfInt64) && IS_STRING_TYPE((args-1)->m_type) && IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_icu_match((&(rv)), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (long)(args[-3].m_data.num) : (long)(0));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 4);
+1 -1
Ver Arquivo
@@ -31,7 +31,7 @@ namespace HPHP {
///////////////////////////////////////////////////////////////////////////////
Variant f_icu_match(CStrRef pattern, CStrRef subject,
VRefParam matches = null, int64_t flags = 0);
VRefParam matches = uninit_null(), int64_t flags = 0);
String f_icu_transliterate(CStrRef str, bool remove_accents);
Array f_icu_tokenize(CStrRef text);
extern const int64_t k_UREGEX_CASE_INSENSITIVE;
+20 -20
Ver Arquivo
@@ -106,7 +106,7 @@ Variant c_UConverter::t___destruct() {
ucnv_close(m_dest);
}
return null;
return uninit_null();
}
/* get/set source/dest encodings */
@@ -302,14 +302,14 @@ void c_UConverter::t_setdestinationencoding(CStrRef encoding) {
String c_UConverter::t_getsourceencoding() {
if (!m_src) {
return null;
return uninit_null();
}
UErrorCode error = U_ZERO_ERROR;
const char *name = ucnv_getName(m_src, &error);
if (U_FAILURE(error)) {
THROW_UFAILURE(ucnv_getName, error, m_error);
return null;
return uninit_null();
}
return String(name);
@@ -317,14 +317,14 @@ String c_UConverter::t_getsourceencoding() {
String c_UConverter::t_getdestinationencoding() {
if (!m_dest) {
return null;
return uninit_null();
}
UErrorCode error = U_ZERO_ERROR;
const char *name = ucnv_getName(m_dest, &error);
if (U_FAILURE(error)) {
THROW_UFAILURE(ucnv_getName, error, m_error);
return null;
return uninit_null();
}
return String(name);
@@ -374,7 +374,7 @@ String c_UConverter::t_getsubstchars() {
ucnv_getSubstChars(m_src, chars, &chars_len, &error);
if (U_FAILURE(error)) {
THROW_UFAILURE(ucnv_getSubstChars, error, m_error);
return null;
return uninit_null();
}
return String(chars, chars_len, CopyString);
@@ -391,7 +391,7 @@ Variant c_UConverter::defaultCallback(int64_t reason, VRefParam error) {
return t_getsubstchars();
}
return null;
return uninit_null();
}
Variant c_UConverter::t_fromucallback(int64_t reason,
@@ -422,7 +422,7 @@ String c_UConverter::doConvert(CStrRef str,
if (!fromCnv || !toCnv) {
err.code = U_INVALID_STATE_ERROR;
err.custom_error_message = "Internal converters not initialized";
return null;
return uninit_null();
}
/* Convert to UChar pivot encoding */
@@ -430,7 +430,7 @@ String c_UConverter::doConvert(CStrRef str,
str.c_str(), str.size(), &error);
if (U_FAILURE(error) && error != U_BUFFER_OVERFLOW_ERROR) {
THROW_UFAILURE(ucnv_toUChars, error, err);
return null;
return uninit_null();
}
// Explicitly include the space for a \u0000 UChar since String
// only allocates one extra byte (not the 2 needed)
@@ -442,7 +442,7 @@ String c_UConverter::doConvert(CStrRef str,
str.c_str(), str.size(), &error);
if (U_FAILURE(error)) {
THROW_UFAILURE(ucnv_toUChars, error, err);
return null;
return uninit_null();
}
temp[temp_len] = 0;
@@ -452,7 +452,7 @@ String c_UConverter::doConvert(CStrRef str,
temp, temp_len, &error);
if (U_FAILURE(error) && error != U_BUFFER_OVERFLOW_ERROR) {
THROW_UFAILURE(ucnv_fromUChars, error, err);
return null;
return uninit_null();
}
String destStr(dest_len, ReserveString);
char *dest = (char*) destStr.mutableSlice().ptr;
@@ -462,7 +462,7 @@ String c_UConverter::doConvert(CStrRef str,
temp, temp_len, &error);
if (U_FAILURE(error)) {
THROW_UFAILURE(ucnv_fromUChars, error, err);
return null;
return uninit_null();
}
return destStr.setSize(dest_len);
}
@@ -472,20 +472,20 @@ Variant c_UConverter::ti_transcode(const char* cls , CStrRef str,
CArrRef options) {
UConverter *fromCnv = NULL, *toCnv = NULL;
if (!setEncoding(fromEncoding, &fromCnv, s_intl_error->m_error)) {
return null;
return uninit_null();
}
if (!setEncoding(toEncoding, &toCnv, s_intl_error->m_error)) {
return null;
return uninit_null();
}
if (options.exists("from_subst") &&
!setSubstChars(options["from_subst"].toString(), fromCnv,
s_intl_error->m_error)) {
return null;
return uninit_null();
}
if (options.exists("to_subst") &&
!setSubstChars(options["to_subst"].toString(), toCnv,
s_intl_error->m_error)) {
return null;
return uninit_null();
}
Variant ret = doConvert(str, toCnv, fromCnv, s_intl_error->m_error);
ucnv_close(toCnv);
@@ -516,7 +516,7 @@ String c_UConverter::ti_reasontext(const char* cls , int64_t reason) {
UCNV_REASON_CASE(CLONE)
default:
raise_warning("Unknown UConverterCallbackReason: %ld", (long)reason);
return null;
return uninit_null();
}
}
@@ -537,7 +537,7 @@ Array c_UConverter::ti_getaliases(const char* cls , CStrRef encoding) {
if (U_FAILURE(error)) {
THROW_UFAILURE(ucnv_getAliases, error, s_intl_error->m_error);
return null;
return uninit_null();
}
Array ret = Array::Create();
@@ -546,7 +546,7 @@ Array c_UConverter::ti_getaliases(const char* cls , CStrRef encoding) {
const char *alias = ucnv_getAlias(encoding, i, &error);
if (U_FAILURE(error)) {
THROW_UFAILURE(ucnv_getAlias, error, s_intl_error->m_error);
return null;
return uninit_null();
}
ret.append(alias);
}
@@ -562,7 +562,7 @@ Array c_UConverter::ti_getstandards(const char* cls ) {
const char *name = ucnv_getStandard(i, &error);
if (U_FAILURE(error)) {
THROW_UFAILURE(ucnv_getStandard, error, s_intl_error->m_error);
return null;
return uninit_null();
}
ret.append(name);
}
+4 -4
Ver Arquivo
@@ -87,7 +87,7 @@ TypedValue* tg1_12SpoofChecker_isSuspicious(TypedValue* rv, HPHP::VM::ActRec* ar
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
rv->m_type = KindOfBoolean;
tvCastToStringInPlace(args-0);
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
rv->m_data.num = (th_12SpoofChecker_isSuspicious((this_), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1))) ? 1LL : 0LL;
return rv;
}
@@ -101,7 +101,7 @@ TypedValue* tg_12SpoofChecker_isSuspicious(HPHP::VM::ActRec *ar) {
if (count >= 1LL && count <= 2LL) {
if (IS_STRING_TYPE((args-0)->m_type)) {
rv.m_type = KindOfBoolean;
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
rv.m_data.num = (th_12SpoofChecker_isSuspicious((this_), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1))) ? 1LL : 0LL;
frame_free_locals_inl(ar, 2);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
@@ -154,7 +154,7 @@ TypedValue* tg1_12SpoofChecker_areConfusable(TypedValue* rv, HPHP::VM::ActRec* a
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
rv->m_data.num = (th_12SpoofChecker_areConfusable((this_), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2))) ? 1LL : 0LL;
return rv;
}
@@ -168,7 +168,7 @@ TypedValue* tg_12SpoofChecker_areConfusable(HPHP::VM::ActRec *ar) {
if (count >= 2LL && count <= 3LL) {
if (IS_STRING_TYPE((args-1)->m_type) && IS_STRING_TYPE((args-0)->m_type)) {
rv.m_type = KindOfBoolean;
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
rv.m_data.num = (th_12SpoofChecker_areConfusable((this_), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2))) ? 1LL : 0LL;
frame_free_locals_inl(ar, 3);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
+2 -2
Ver Arquivo
@@ -52,8 +52,8 @@ class c_SpoofChecker : public ExtObjectData {
public: c_SpoofChecker(VM::Class* cls = c_SpoofChecker::s_cls);
public: ~c_SpoofChecker();
public: void t___construct();
public: bool t_issuspicious(CStrRef text, VRefParam issuesFound = null);
public: bool t_areconfusable(CStrRef s1, CStrRef s2, VRefParam issuesFound = null);
public: bool t_issuspicious(CStrRef text, VRefParam issuesFound = uninit_null());
public: bool t_areconfusable(CStrRef s1, CStrRef s2, VRefParam issuesFound = uninit_null());
public: void t_setallowedlocales(CStrRef localesList);
public: void t_setchecks(int checks);
+2 -2
Ver Arquivo
@@ -1578,7 +1578,7 @@ Variant f_getimagesize(CStrRef filename, VRefParam imageinfo /* = null */) {
int itype = 0;
struct gfxinfo *result = NULL;
if (imageinfo.isReferenced()) {
imageinfo = null;
imageinfo = uninit_null();
}
Array ret;
@@ -7602,7 +7602,7 @@ static void add_assoc_image_info(Array &value, bool sub_array,
name = uname;
}
if (info_data->length==0) {
tmpi->set(String(name, CopyString), null);
tmpi->set(String(name, CopyString), uninit_null());
} else {
switch (info_data->format) {
default:
+12 -12
Ver Arquivo
@@ -74,7 +74,7 @@ TypedValue * fg1_getimagesize(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t coun
TypedValue * fg1_getimagesize(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
tvCastToStringInPlace(args-0);
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
fh_getimagesize((rv), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -86,7 +86,7 @@ TypedValue* fg_getimagesize(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 1LL && count <= 2LL) {
if (IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
fh_getimagesize((&(rv)), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 2);
@@ -3556,7 +3556,7 @@ TypedValue * fg1_imageftbbox(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count
if ((args-0)->m_type != KindOfDouble) {
tvCastToDoubleInPlace(args-0);
}
Array defVal4 = null;
Array defVal4 = uninit_null();
fh_imageftbbox((rv), (args[-0].m_data.dbl), (args[-1].m_data.dbl), (Value*)(args-2), (Value*)(args-3), (count > 4) ? (Value*)(args-4) : (Value*)(&defVal4));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -3568,7 +3568,7 @@ TypedValue* fg_imageftbbox(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 4LL && count <= 5LL) {
if ((count <= 4 || (args-4)->m_type == KindOfArray) && IS_STRING_TYPE((args-3)->m_type) && IS_STRING_TYPE((args-2)->m_type) && (args-1)->m_type == KindOfDouble && (args-0)->m_type == KindOfDouble) {
Array defVal4 = null;
Array defVal4 = uninit_null();
fh_imageftbbox((&(rv)), (args[-0].m_data.dbl), (args[-1].m_data.dbl), (Value*)(args-2), (Value*)(args-3), (count > 4) ? (Value*)(args-4) : (Value*)(&defVal4));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 5);
@@ -3647,7 +3647,7 @@ TypedValue * fg1_imagefttext(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count
if ((args-0)->m_type != KindOfObject) {
tvCastToObjectInPlace(args-0);
}
Array defVal8 = null;
Array defVal8 = uninit_null();
fh_imagefttext((rv), (Value*)(args-0), (args[-1].m_data.dbl), (args[-2].m_data.dbl), (int)(args[-3].m_data.num), (int)(args[-4].m_data.num), (int)(args[-5].m_data.num), (Value*)(args-6), (Value*)(args-7), (count > 8) ? (Value*)(args-8) : (Value*)(&defVal8));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -3659,7 +3659,7 @@ TypedValue* fg_imagefttext(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 8LL && count <= 9LL) {
if ((count <= 8 || (args-8)->m_type == KindOfArray) && IS_STRING_TYPE((args-7)->m_type) && IS_STRING_TYPE((args-6)->m_type) && (args-5)->m_type == KindOfInt64 && (args-4)->m_type == KindOfInt64 && (args-3)->m_type == KindOfInt64 && (args-2)->m_type == KindOfDouble && (args-1)->m_type == KindOfDouble && (args-0)->m_type == KindOfObject) {
Array defVal8 = null;
Array defVal8 = uninit_null();
fh_imagefttext((&(rv)), (Value*)(args-0), (args[-1].m_data.dbl), (args[-2].m_data.dbl), (int)(args[-3].m_data.num), (int)(args[-4].m_data.num), (int)(args[-5].m_data.num), (Value*)(args-6), (Value*)(args-7), (count > 8) ? (Value*)(args-8) : (Value*)(&defVal8));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 9);
@@ -6615,9 +6615,9 @@ TypedValue * fg1_exif_thumbnail(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t co
TypedValue * fg1_exif_thumbnail(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
tvCastToStringInPlace(args-0);
VRefParamValue defVal1 = null;
VRefParamValue defVal2 = null;
VRefParamValue defVal3 = null;
VRefParamValue defVal1 = uninit_null();
VRefParamValue defVal2 = uninit_null();
VRefParamValue defVal3 = uninit_null();
fh_exif_thumbnail((rv), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (args-3) : (TypedValue*)(&defVal3));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -6629,9 +6629,9 @@ TypedValue* fg_exif_thumbnail(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 1LL && count <= 4LL) {
if (IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal1 = null;
VRefParamValue defVal2 = null;
VRefParamValue defVal3 = null;
VRefParamValue defVal1 = uninit_null();
VRefParamValue defVal2 = uninit_null();
VRefParamValue defVal3 = uninit_null();
fh_exif_thumbnail((&(rv)), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (args-3) : (TypedValue*)(&defVal3));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 4);
+4 -4
Ver Arquivo
@@ -50,7 +50,7 @@ private:
};
Array f_gd_info();
Variant f_getimagesize(CStrRef filename, VRefParam imageinfo = null);
Variant f_getimagesize(CStrRef filename, VRefParam imageinfo = uninit_null());
String f_image_type_to_extension(int imagetype, bool include_dot = true);
String f_image_type_to_mime_type(int imagetype);
bool f_image2wbmp(CObjRef image, CStrRef filename = null_string, int threshold = -1);
@@ -105,8 +105,8 @@ bool f_imagefilltoborder(CObjRef image, int x, int y, int border, int color);
bool f_imagefilter(CObjRef image, int filtertype, int arg1 = 0, int arg2 = 0, int arg3 = 0, int arg4 = 0);
int64_t f_imagefontheight(int font);
int64_t f_imagefontwidth(int font);
Variant f_imageftbbox(double size, double angle, CStrRef font_file, CStrRef text, CArrRef extrainfo = null);
Variant f_imagefttext(CObjRef image, double size, double angle, int x, int y, int col, CStrRef font_file, CStrRef text, CArrRef extrainfo = null);
Variant f_imageftbbox(double size, double angle, CStrRef font_file, CStrRef text, CArrRef extrainfo = uninit_null());
Variant f_imagefttext(CObjRef image, double size, double angle, int x, int y, int col, CStrRef font_file, CStrRef text, CArrRef extrainfo = uninit_null());
bool f_imagegammacorrect(CObjRef image, double inputgamma, double outputgamma);
bool f_imagegd2(CObjRef image, CStrRef filename = null_string, int chunk_size = 0, int type = 0);
bool f_imagegd(CObjRef image, CStrRef filename = null_string);
@@ -155,7 +155,7 @@ Variant f_exif_imagetype(CStrRef filename);
Variant f_exif_read_data(CStrRef filename, CStrRef sections = null_string, bool arrays = false, bool thumbnail = false);
Variant f_read_exif_data(CStrRef filename, CStrRef sections = null_string, bool arrays = false, bool thumbnail = false);
Variant f_exif_tagname(int index);
Variant f_exif_thumbnail(CStrRef filename, VRefParam width = null, VRefParam height = null, VRefParam imagetype = null);
Variant f_exif_thumbnail(CStrRef filename, VRefParam width = uninit_null(), VRefParam height = uninit_null(), VRefParam imagetype = uninit_null());
///////////////////////////////////////////////////////////////////////////////
}
+2 -2
Ver Arquivo
@@ -510,7 +510,7 @@ Object c_ImageSprite::t_addurl(CStrRef url, int timeout_ms /* = 0 */,
}
Object c_ImageSprite::t_clear(CVarRef files /* = null */) {
if (same(files, null)) {
if (same(files, uninit_null())) {
// Clear them all, might as well __destruct
t___destruct();
} else if (files.isArray()) {
@@ -1176,7 +1176,7 @@ Variant c_ImageSprite::t___destruct() {
m_img_errors = Array::Create();
m_sprite_errors = Array::Create();
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
+6 -6
Ver Arquivo
@@ -98,7 +98,7 @@ TypedValue* tg1_11ImageSprite_addFile(TypedValue* rv, HPHP::VM::ActRec* ar, int6
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
Array defVal1 = null;
Array defVal1 = uninit_null();
th_11ImageSprite_addFile((Value*)(rv), (this_), (Value*)(args-0), (count > 1) ? (Value*)(args-1) : (Value*)(&defVal1));
if (rv->m_data.num == 0LL)rv->m_type = KindOfNull;
return rv;
@@ -113,7 +113,7 @@ TypedValue* tg_11ImageSprite_addFile(HPHP::VM::ActRec *ar) {
if (count >= 1LL && count <= 2LL) {
if ((count <= 1 || (args-1)->m_type == KindOfArray) && IS_STRING_TYPE((args-0)->m_type)) {
rv.m_type = KindOfObject;
Array defVal1 = null;
Array defVal1 = uninit_null();
th_11ImageSprite_addFile((Value*)(&(rv)), (this_), (Value*)(args-0), (count > 1) ? (Value*)(args-1) : (Value*)(&defVal1));
if (rv.m_data.num == 0LL) rv.m_type = KindOfNull;
frame_free_locals_inl(ar, 2);
@@ -171,7 +171,7 @@ TypedValue* tg1_11ImageSprite_addString(TypedValue* rv, HPHP::VM::ActRec* ar, in
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
Array defVal2 = null;
Array defVal2 = uninit_null();
th_11ImageSprite_addString((Value*)(rv), (this_), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (Value*)(args-2) : (Value*)(&defVal2));
if (rv->m_data.num == 0LL)rv->m_type = KindOfNull;
return rv;
@@ -186,7 +186,7 @@ TypedValue* tg_11ImageSprite_addString(HPHP::VM::ActRec *ar) {
if (count >= 2LL && count <= 3LL) {
if ((count <= 2 || (args-2)->m_type == KindOfArray) && IS_STRING_TYPE((args-1)->m_type) && IS_STRING_TYPE((args-0)->m_type)) {
rv.m_type = KindOfObject;
Array defVal2 = null;
Array defVal2 = uninit_null();
th_11ImageSprite_addString((Value*)(&(rv)), (this_), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (Value*)(args-2) : (Value*)(&defVal2));
if (rv.m_data.num == 0LL) rv.m_type = KindOfNull;
frame_free_locals_inl(ar, 3);
@@ -245,7 +245,7 @@ TypedValue* tg1_11ImageSprite_addUrl(TypedValue* rv, HPHP::VM::ActRec* ar, int64
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
Array defVal2 = null;
Array defVal2 = uninit_null();
th_11ImageSprite_addUrl((Value*)(rv), (this_), (Value*)(args-0), (count > 1) ? (int)(args[-1].m_data.num) : (int)(0), (count > 2) ? (Value*)(args-2) : (Value*)(&defVal2));
if (rv->m_data.num == 0LL)rv->m_type = KindOfNull;
return rv;
@@ -260,7 +260,7 @@ TypedValue* tg_11ImageSprite_addUrl(HPHP::VM::ActRec *ar) {
if (count >= 1LL && count <= 3LL) {
if ((count <= 2 || (args-2)->m_type == KindOfArray) && (count <= 1 || (args-1)->m_type == KindOfInt64) && IS_STRING_TYPE((args-0)->m_type)) {
rv.m_type = KindOfObject;
Array defVal2 = null;
Array defVal2 = uninit_null();
th_11ImageSprite_addUrl((Value*)(&(rv)), (this_), (Value*)(args-0), (count > 1) ? (int)(args[-1].m_data.num) : (int)(0), (count > 2) ? (Value*)(args-2) : (Value*)(&defVal2));
if (rv.m_data.num == 0LL) rv.m_type = KindOfNull;
frame_free_locals_inl(ar, 3);
+4 -4
Ver Arquivo
@@ -40,10 +40,10 @@ class c_ImageSprite : public ExtObjectData, public Sweepable {
public: c_ImageSprite(VM::Class* cls = c_ImageSprite::s_cls);
public: ~c_ImageSprite();
public: void t___construct();
public: Object t_addfile(CStrRef file, CArrRef options = null);
public: Object t_addstring(CStrRef id, CStrRef data, CArrRef options = null);
public: Object t_addurl(CStrRef url, int timeout_ms = 0, CArrRef Options = null);
public: Object t_clear(CVarRef paths = null);
public: Object t_addfile(CStrRef file, CArrRef options = uninit_null());
public: Object t_addstring(CStrRef id, CStrRef data, CArrRef options = uninit_null());
public: Object t_addurl(CStrRef url, int timeout_ms = 0, CArrRef Options = uninit_null());
public: Object t_clear(CVarRef paths = uninit_null());
public: Object t_loaddims(bool block = false);
public: Object t_loadimages(bool block = false);
public: String t_output(CStrRef output_file = null_string, CStrRef format = "png", int quality = 75);
+1 -1
Ver Arquivo
@@ -1221,7 +1221,7 @@ Variant f_imap_last_error() {
return String((const char *)cur->text.data, CopyString);
}
}
return null;
return uninit_null();
}
Variant f_imap_list(CObjRef imap_stream, CStrRef ref, CStrRef pattern) {
+6 -6
Ver Arquivo
@@ -588,7 +588,7 @@ Variant c_Normalizer::ti_isnormalized(const char* cls , CStrRef input,
s_intl_error->m_error.code = U_ILLEGAL_ARGUMENT_ERROR;
s_intl_error->m_error.custom_error_message =
"normalizer_isnormalized: illegal normalization form";
return null;
return uninit_null();
}
/* First convert the string to UTF-16. */
@@ -639,7 +639,7 @@ Variant c_Normalizer::ti_normalize(const char* cls , CStrRef input,
s_intl_error->m_error.code = U_ILLEGAL_ARGUMENT_ERROR;
s_intl_error->m_error.custom_error_message =
"normalizer_normalize: illegal normalization form";
return null;
return uninit_null();
}
/* First convert the string to UTF-16. */
@@ -653,7 +653,7 @@ Variant c_Normalizer::ti_normalize(const char* cls , CStrRef input,
s_intl_error->m_error.custom_error_message =
"Error converting string to UTF-16.";
free(uinput);
return null;
return uninit_null();
}
/* Allocate memory for the destination buffer for normalization */
@@ -675,7 +675,7 @@ Variant c_Normalizer::ti_normalize(const char* cls , CStrRef input,
status != U_STRING_NOT_TERMINATED_WARNING) {
free(uret_buf);
free(uinput);
return null;
return uninit_null();
}
if (size_needed > uret_len) {
@@ -699,7 +699,7 @@ Variant c_Normalizer::ti_normalize(const char* cls , CStrRef input,
s_intl_error->m_error.custom_error_message = "Error normalizing string";
free(uret_buf);
free(uinput);
return null;
return uninit_null();
}
}
@@ -716,7 +716,7 @@ Variant c_Normalizer::ti_normalize(const char* cls , CStrRef input,
s_intl_error->m_error.code = status;
s_intl_error->m_error.custom_error_message =
"normalizer_normalize: error converting normalized text UTF-8";
return null;
return uninit_null();
}
return String(ret_buf, ret_len, AttachString);
+6 -6
Ver Arquivo
@@ -782,7 +782,7 @@ TypedValue * fg1_idn_to_ascii(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t coun
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
VRefParamValue defVal3 = null;
VRefParamValue defVal3 = uninit_null();
fh_idn_to_ascii((rv), (Value*)(args-0), (count > 1) ? (long)(args[-1].m_data.num) : (long)(0), (count > 2) ? (long)(args[-2].m_data.num) : (long)(0), (count > 3) ? (args-3) : (TypedValue*)(&defVal3));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -794,7 +794,7 @@ TypedValue* fg_idn_to_ascii(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 1LL && count <= 4LL) {
if ((count <= 2 || (args-2)->m_type == KindOfInt64) && (count <= 1 || (args-1)->m_type == KindOfInt64) && IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal3 = null;
VRefParamValue defVal3 = uninit_null();
fh_idn_to_ascii((&(rv)), (Value*)(args-0), (count > 1) ? (long)(args[-1].m_data.num) : (long)(0), (count > 2) ? (long)(args[-2].m_data.num) : (long)(0), (count > 3) ? (args-3) : (TypedValue*)(&defVal3));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 4);
@@ -852,7 +852,7 @@ TypedValue * fg1_idn_to_unicode(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t co
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
VRefParamValue defVal3 = null;
VRefParamValue defVal3 = uninit_null();
fh_idn_to_unicode((rv), (Value*)(args-0), (count > 1) ? (long)(args[-1].m_data.num) : (long)(0), (count > 2) ? (long)(args[-2].m_data.num) : (long)(0), (count > 3) ? (args-3) : (TypedValue*)(&defVal3));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -864,7 +864,7 @@ TypedValue* fg_idn_to_unicode(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 1LL && count <= 4LL) {
if ((count <= 2 || (args-2)->m_type == KindOfInt64) && (count <= 1 || (args-1)->m_type == KindOfInt64) && IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal3 = null;
VRefParamValue defVal3 = uninit_null();
fh_idn_to_unicode((&(rv)), (Value*)(args-0), (count > 1) ? (long)(args[-1].m_data.num) : (long)(0), (count > 2) ? (long)(args[-2].m_data.num) : (long)(0), (count > 3) ? (args-3) : (TypedValue*)(&defVal3));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 4);
@@ -922,7 +922,7 @@ TypedValue * fg1_idn_to_utf8(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
VRefParamValue defVal3 = null;
VRefParamValue defVal3 = uninit_null();
fh_idn_to_utf8((rv), (Value*)(args-0), (count > 1) ? (long)(args[-1].m_data.num) : (long)(0), (count > 2) ? (long)(args[-2].m_data.num) : (long)(0), (count > 3) ? (args-3) : (TypedValue*)(&defVal3));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -934,7 +934,7 @@ TypedValue* fg_idn_to_utf8(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 1LL && count <= 4LL) {
if ((count <= 2 || (args-2)->m_type == KindOfInt64) && (count <= 1 || (args-1)->m_type == KindOfInt64) && IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal3 = null;
VRefParamValue defVal3 = uninit_null();
fh_idn_to_utf8((&(rv)), (Value*)(args-0), (count > 1) ? (long)(args[-1].m_data.num) : (long)(0), (count > 2) ? (long)(args[-2].m_data.num) : (long)(0), (count > 3) ? (args-3) : (TypedValue*)(&defVal3));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 4);
+3 -3
Ver Arquivo
@@ -45,9 +45,9 @@ Variant f_collator_set_attribute(CVarRef obj, int64_t attr, int64_t val);
Variant f_collator_set_strength(CVarRef obj, int64_t strength);
Variant f_collator_sort_with_sort_keys(CVarRef obj, VRefParam arr);
Variant f_collator_sort(CVarRef obj, VRefParam arr, int64_t sort_flag = q_Collator$$SORT_REGULAR);
Variant f_idn_to_ascii(CStrRef domain, int64_t options = 0, int64_t variant = 0, VRefParam idna_info = null);
Variant f_idn_to_unicode(CStrRef domain, int64_t options = 0, int64_t variant = 0, VRefParam idna_info = null);
Variant f_idn_to_utf8(CStrRef domain, int64_t options = 0, int64_t variant = 0, VRefParam idna_info = null);
Variant f_idn_to_ascii(CStrRef domain, int64_t options = 0, int64_t variant = 0, VRefParam idna_info = uninit_null());
Variant f_idn_to_unicode(CStrRef domain, int64_t options = 0, int64_t variant = 0, VRefParam idna_info = uninit_null());
Variant f_idn_to_utf8(CStrRef domain, int64_t options = 0, int64_t variant = 0, VRefParam idna_info = uninit_null());
extern const int64_t q_Collator$$SORT_REGULAR;
extern const int64_t q_Collator$$SORT_NUMERIC;
extern const int64_t q_Collator$$SORT_STRING;
+4 -4
Ver Arquivo
@@ -227,7 +227,7 @@ TypedValue * fg1_msg_send(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
if ((args-0)->m_type != KindOfObject) {
tvCastToObjectInPlace(args-0);
}
VRefParamValue defVal5 = null;
VRefParamValue defVal5 = uninit_null();
rv->m_data.num = (fh_msg_send((Value*)(args-0), (long)(args[-1].m_data.num), (args-2), (count > 3) ? (bool)(args[-3].m_data.num) : (bool)(true), (count > 4) ? (bool)(args[-4].m_data.num) : (bool)(true), (count > 5) ? (args-5) : (TypedValue*)(&defVal5))) ? 1LL : 0LL;
return rv;
}
@@ -239,7 +239,7 @@ TypedValue* fg_msg_send(HPHP::VM::ActRec *ar) {
if (count >= 3LL && count <= 6LL) {
if ((count <= 4 || (args-4)->m_type == KindOfBoolean) && (count <= 3 || (args-3)->m_type == KindOfBoolean) && (args-1)->m_type == KindOfInt64 && (args-0)->m_type == KindOfObject) {
rv.m_type = KindOfBoolean;
VRefParamValue defVal5 = null;
VRefParamValue defVal5 = uninit_null();
rv.m_data.num = (fh_msg_send((Value*)(args-0), (long)(args[-1].m_data.num), (args-2), (count > 3) ? (bool)(args[-3].m_data.num) : (bool)(true), (count > 4) ? (bool)(args[-4].m_data.num) : (bool)(true), (count > 5) ? (args-5) : (TypedValue*)(&defVal5))) ? 1LL : 0LL;
frame_free_locals_no_this_inl(ar, 6);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
@@ -306,7 +306,7 @@ TypedValue * fg1_msg_receive(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count
if ((args-0)->m_type != KindOfObject) {
tvCastToObjectInPlace(args-0);
}
VRefParamValue defVal7 = null;
VRefParamValue defVal7 = uninit_null();
rv->m_data.num = (fh_msg_receive((Value*)(args-0), (long)(args[-1].m_data.num), (args-2), (long)(args[-3].m_data.num), (args-4), (count > 5) ? (bool)(args[-5].m_data.num) : (bool)(true), (count > 6) ? (long)(args[-6].m_data.num) : (long)(0), (count > 7) ? (args-7) : (TypedValue*)(&defVal7))) ? 1LL : 0LL;
return rv;
}
@@ -318,7 +318,7 @@ TypedValue* fg_msg_receive(HPHP::VM::ActRec *ar) {
if (count >= 5LL && count <= 8LL) {
if ((count <= 6 || (args-6)->m_type == KindOfInt64) && (count <= 5 || (args-5)->m_type == KindOfBoolean) && (args-3)->m_type == KindOfInt64 && (args-1)->m_type == KindOfInt64 && (args-0)->m_type == KindOfObject) {
rv.m_type = KindOfBoolean;
VRefParamValue defVal7 = null;
VRefParamValue defVal7 = uninit_null();
rv.m_data.num = (fh_msg_receive((Value*)(args-0), (long)(args[-1].m_data.num), (args-2), (long)(args[-3].m_data.num), (args-4), (count > 5) ? (bool)(args[-5].m_data.num) : (bool)(true), (count > 6) ? (long)(args[-6].m_data.num) : (long)(0), (count > 7) ? (args-7) : (TypedValue*)(&defVal7))) ? 1LL : 0LL;
frame_free_locals_no_this_inl(ar, 8);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
+2 -2
Ver Arquivo
@@ -30,10 +30,10 @@ Variant f_msg_get_queue(int64_t key, int64_t perms = 0666);
bool f_msg_queue_exists(int64_t key);
bool f_msg_send(CObjRef queue, int64_t msgtype, CVarRef message,
bool serialize = true, bool blocking = true,
VRefParam errorcode = null);
VRefParam errorcode = uninit_null());
bool f_msg_receive(CObjRef queue, int64_t desiredmsgtype, VRefParam msgtype,
int64_t maxsize, VRefParam message, bool unserialize = true,
int64_t flags = 0, VRefParam errorcode = null);
int64_t flags = 0, VRefParam errorcode = uninit_null());
bool f_msg_remove_queue(CObjRef queue);
bool f_msg_set_queue(CObjRef queue, CArrRef data);
Array f_msg_stat_queue(CObjRef queue);
+5 -5
Ver Arquivo
@@ -501,20 +501,20 @@ void c_MutableArrayIterator::t___construct(VRefParam array) {
}
Variant c_MutableArrayIterator::t___destruct() {
return null;
return uninit_null();
}
Variant c_MutableArrayIterator::t_currentref() {
if (!m_valid) return null;
if (!m_valid) return uninit_null();
MArrayIter& mi = marr();
if (mi.end()) return null;
if (mi.end()) return uninit_null();
return strongBind(mi.val());
}
Variant c_MutableArrayIterator::t_current() {
if (!m_valid) return null;
if (!m_valid) return uninit_null();
MArrayIter& mi = marr();
if (mi.end()) return null;
if (mi.end()) return uninit_null();
return mi.val();
}
+3 -3
Ver Arquivo
@@ -51,7 +51,7 @@ String f_json_encode(CVarRef value, CVarRef options /* = 0 */) {
Variant f_json_decode(CStrRef json, bool assoc /* = false */,
CVarRef options /* = 0 */) {
if (json.empty()) {
return null;
return uninit_null();
}
int64_t json_options = options.toInt64();
@@ -66,7 +66,7 @@ Variant f_json_decode(CStrRef json, bool assoc /* = false */,
}
if (json.size() == 4) {
if (!strcasecmp(json.data(), "null")) return null;
if (!strcasecmp(json.data(), "null")) return uninit_null();
if (!strcasecmp(json.data(), "true")) return true;
} else if (json.size() == 5 && !strcasecmp(json.data(), "false")) {
return false;
@@ -92,7 +92,7 @@ Variant f_json_decode(CStrRef json, bool assoc /* = false */,
}
if (ch0 == '{' || ch0 == '[') { /* invalid JSON string */
return null;
return uninit_null();
}
return json;
+1 -1
Ver Arquivo
@@ -1012,7 +1012,7 @@ Variant f_ldap_get_entries(CObjRef link, CObjRef result) {
Array ret;
ret.set("count", num_entries);
if (num_entries == 0) {
return null;
return uninit_null();
}
LDAPMessage *ldap_result_entry = ldap_first_entry(ldap, res->data);
+6 -6
Ver Arquivo
@@ -2143,9 +2143,9 @@ TypedValue * fg1_ldap_parse_result(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t
if ((args-0)->m_type != KindOfObject) {
tvCastToObjectInPlace(args-0);
}
VRefParamValue defVal3 = null;
VRefParamValue defVal4 = null;
VRefParamValue defVal5 = null;
VRefParamValue defVal3 = uninit_null();
VRefParamValue defVal4 = uninit_null();
VRefParamValue defVal5 = uninit_null();
rv->m_data.num = (fh_ldap_parse_result((Value*)(args-0), (Value*)(args-1), (args-2), (count > 3) ? (args-3) : (TypedValue*)(&defVal3), (count > 4) ? (args-4) : (TypedValue*)(&defVal4), (count > 5) ? (args-5) : (TypedValue*)(&defVal5))) ? 1LL : 0LL;
return rv;
}
@@ -2157,9 +2157,9 @@ TypedValue* fg_ldap_parse_result(HPHP::VM::ActRec *ar) {
if (count >= 3LL && count <= 6LL) {
if ((args-1)->m_type == KindOfObject && (args-0)->m_type == KindOfObject) {
rv.m_type = KindOfBoolean;
VRefParamValue defVal3 = null;
VRefParamValue defVal4 = null;
VRefParamValue defVal5 = null;
VRefParamValue defVal3 = uninit_null();
VRefParamValue defVal4 = uninit_null();
VRefParamValue defVal5 = uninit_null();
rv.m_data.num = (fh_ldap_parse_result((Value*)(args-0), (Value*)(args-1), (args-2), (count > 3) ? (args-3) : (TypedValue*)(&defVal3), (count > 4) ? (args-4) : (TypedValue*)(&defVal4), (count > 5) ? (args-5) : (TypedValue*)(&defVal5))) ? 1LL : 0LL;
frame_free_locals_no_this_inl(ar, 6);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
+1 -1
Ver Arquivo
@@ -61,7 +61,7 @@ Variant f_ldap_next_attribute(CObjRef link, CObjRef result_entry);
Variant f_ldap_first_reference(CObjRef link, CObjRef result);
Variant f_ldap_next_reference(CObjRef link, CObjRef result_entry);
bool f_ldap_parse_reference(CObjRef link, CObjRef result_entry, VRefParam referrals);
bool f_ldap_parse_result(CObjRef link, CObjRef result, VRefParam errcode, VRefParam matcheddn = null, VRefParam errmsg = null, VRefParam referrals = null);
bool f_ldap_parse_result(CObjRef link, CObjRef result, VRefParam errcode, VRefParam matcheddn = uninit_null(), VRefParam errmsg = uninit_null(), VRefParam referrals = uninit_null());
bool f_ldap_free_result(CObjRef result);
Variant f_ldap_get_values_len(CObjRef link, CObjRef result_entry, CStrRef attribute);
Variant f_ldap_get_values(CObjRef link, CObjRef result_entry, CStrRef attribute);
+6 -6
Ver Arquivo
@@ -1342,7 +1342,7 @@ TypedValue * fg1_mb_ereg(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) __
TypedValue * fg1_mb_ereg(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
tvCastToStringInPlace(args-1);
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_mb_ereg((rv), (args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -1354,7 +1354,7 @@ TypedValue* fg_mb_ereg(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 2LL && count <= 3LL) {
if (IS_STRING_TYPE((args-1)->m_type)) {
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_mb_ereg((&(rv)), (args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 3);
@@ -1462,7 +1462,7 @@ TypedValue * fg1_mb_eregi(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) _
TypedValue * fg1_mb_eregi(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
tvCastToStringInPlace(args-1);
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_mb_eregi((rv), (args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -1474,7 +1474,7 @@ TypedValue* fg_mb_eregi(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 2LL && count <= 3LL) {
if (IS_STRING_TYPE((args-1)->m_type)) {
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_mb_eregi((&(rv)), (args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 3);
@@ -1823,7 +1823,7 @@ TypedValue * fg1_mb_parse_str(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t coun
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
rv->m_type = KindOfBoolean;
tvCastToStringInPlace(args-0);
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
rv->m_data.num = (fh_mb_parse_str((Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1))) ? 1LL : 0LL;
return rv;
}
@@ -1835,7 +1835,7 @@ TypedValue* fg_mb_parse_str(HPHP::VM::ActRec *ar) {
if (count >= 1LL && count <= 2LL) {
if (IS_STRING_TYPE((args-0)->m_type)) {
rv.m_type = KindOfBoolean;
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
rv.m_data.num = (fh_mb_parse_str((Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1))) ? 1LL : 0LL;
frame_free_locals_no_this_inl(ar, 2);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
+3 -3
Ver Arquivo
@@ -48,16 +48,16 @@ Variant f_mb_ereg_search_pos(CStrRef pattern = null_string, CStrRef option = nul
Variant f_mb_ereg_search_regs(CStrRef pattern = null_string, CStrRef option = null_string);
bool f_mb_ereg_search_setpos(int position);
Variant f_mb_ereg_search(CStrRef pattern = null_string, CStrRef option = null_string);
Variant f_mb_ereg(CVarRef pattern, CStrRef str, VRefParam regs = null);
Variant f_mb_ereg(CVarRef pattern, CStrRef str, VRefParam regs = uninit_null());
Variant f_mb_eregi_replace(CVarRef pattern, CStrRef replacement, CStrRef str, CStrRef option = null_string);
Variant f_mb_eregi(CVarRef pattern, CStrRef str, VRefParam regs = null);
Variant f_mb_eregi(CVarRef pattern, CStrRef str, VRefParam regs = uninit_null());
Variant f_mb_get_info(CStrRef type = null_string);
Variant f_mb_http_input(CStrRef type = null_string);
Variant f_mb_http_output(CStrRef encoding = null_string);
Variant f_mb_internal_encoding(CStrRef encoding = null_string);
Variant f_mb_language(CStrRef language = null_string);
String f_mb_output_handler(CStrRef contents, int status);
bool f_mb_parse_str(CStrRef encoded_string, VRefParam result = null);
bool f_mb_parse_str(CStrRef encoded_string, VRefParam result = uninit_null());
Variant f_mb_preferred_mime_name(CStrRef encoding);
Variant f_mb_regex_encoding(CStrRef encoding = null_string);
String f_mb_regex_set_options(CStrRef options = null_string);
+3 -3
Ver Arquivo
@@ -144,11 +144,11 @@ String static memcache_prepare_for_storage(CVarRef var, int &flag) {
Variant static memcache_fetch_from_storage(const char *payload,
size_t payload_len,
uint32_t flags) {
Variant ret = null;
Variant ret = uninit_null();
if (flags & MMC_COMPRESSED) {
raise_warning("Unable to handle compressed values yet");
return null;
return uninit_null();
}
if (flags & MMC_SERIALIZED) {
@@ -547,7 +547,7 @@ bool c_Memcache::t_addserver(CStrRef host, int port /* = 11211 */,
Variant c_Memcache::t___destruct() {
t_close();
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
+3 -3
Ver Arquivo
@@ -397,7 +397,7 @@ TypedValue * fg1_memcache_get(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t coun
TypedValue * fg1_memcache_get(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
tvCastToObjectInPlace(args-0);
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_memcache_get((rv), (Value*)(args-0), (args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -409,7 +409,7 @@ TypedValue* fg_memcache_get(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 2LL && count <= 3LL) {
if ((args-0)->m_type == KindOfObject) {
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_memcache_get((&(rv)), (Value*)(args-0), (args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 3);
@@ -1764,7 +1764,7 @@ TypedValue* tg_8Memcache_get(HPHP::VM::ActRec *ar) {
ObjectData* this_ = (ar->hasThis() ? ar->getThis() : NULL);
if (this_) {
if (count >= 1LL && count <= 2LL) {
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
th_8Memcache_get((&(rv)), (this_), (args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_inl(ar, 2);
+2 -2
Ver Arquivo
@@ -30,7 +30,7 @@ Object f_memcache_pconnect(CStrRef host, int port = 0, int timeout = 0, int time
bool f_memcache_add(CObjRef memcache, CStrRef key, CVarRef var, int flag = 0, int expire = 0);
bool f_memcache_set(CObjRef memcache, CStrRef key, CVarRef var, int flag = 0, int expire = 0);
bool f_memcache_replace(CObjRef memcache, CStrRef key, CVarRef var, int flag = 0, int expire = 0);
Variant f_memcache_get(CObjRef memcache, CVarRef key, VRefParam flags = null);
Variant f_memcache_get(CObjRef memcache, CVarRef key, VRefParam flags = uninit_null());
bool f_memcache_delete(CObjRef memcache, CStrRef key, int expire = 0);
int64_t f_memcache_increment(CObjRef memcache, CStrRef key, int offset = 1);
int64_t f_memcache_decrement(CObjRef memcache, CStrRef key, int offset = 1);
@@ -63,7 +63,7 @@ class c_Memcache : public ExtObjectData, public Sweepable {
public: bool t_add(CStrRef key, CVarRef var, int flag = 0, int expire = 0);
public: bool t_set(CStrRef key, CVarRef var, int flag = 0, int expire = 0);
public: bool t_replace(CStrRef key, CVarRef var, int flag = 0, int expire = 0);
public: Variant t_get(CVarRef key, VRefParam flags = null);
public: Variant t_get(CVarRef key, VRefParam flags = uninit_null());
public: bool t_delete(CStrRef key, int expire = 0);
public: int64_t t_increment(CStrRef key, int offset = 1);
public: int64_t t_decrement(CStrRef key, int offset = 1);
+3 -3
Ver Arquivo
@@ -55,7 +55,7 @@ int64_t f_connection_timeout() {
}
Variant f_constant(CStrRef name) {
if (!name.get()) return null;
if (!name.get()) return uninit_null();
const char *data = name.data();
int len = name.length();
char *colon;
@@ -91,7 +91,7 @@ Variant f_constant(CStrRef name) {
}
}
raise_warning("Couldn't find constant %s", data);
return null;
return uninit_null();
} else {
TypedValue* cns = g_vmContext->getCns(name.get());
if (cns == NULL) {
@@ -100,7 +100,7 @@ Variant f_constant(CStrRef name) {
}
}
if (cns) return tvAsVariant(cns);
return null;
return uninit_null();
}
}
+2 -2
Ver Arquivo
@@ -829,7 +829,7 @@ TypedValue * fg1_php_check_syntax(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
rv->m_type = KindOfBoolean;
tvCastToStringInPlace(args-0);
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
rv->m_data.num = (fh_php_check_syntax((Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1))) ? 1LL : 0LL;
return rv;
}
@@ -841,7 +841,7 @@ TypedValue* fg_php_check_syntax(HPHP::VM::ActRec *ar) {
if (count >= 1LL && count <= 2LL) {
if (IS_STRING_TYPE((args-0)->m_type)) {
rv.m_type = KindOfBoolean;
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
rv.m_data.num = (fh_php_check_syntax((Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1))) ? 1LL : 0LL;
frame_free_locals_no_this_inl(ar, 2);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
+1 -1
Ver Arquivo
@@ -41,7 +41,7 @@ Variant f_show_source(CStrRef filename, bool ret = false);
Variant f_highlight_string(CStrRef str, bool ret = false);
int64_t f_ignore_user_abort(bool setting = false);
Variant f_pack(int _argc, CStrRef format, CArrRef _argv = null_array);
bool f_php_check_syntax(CStrRef filename, VRefParam error_message = null);
bool f_php_check_syntax(CStrRef filename, VRefParam error_message = uninit_null());
String f_php_strip_whitespace(CStrRef filename);
int64_t f_sleep(int seconds);
void f_usleep(int micro_seconds);
+3 -3
Ver Arquivo
@@ -740,7 +740,7 @@ Variant mysql_makevalue(CStrRef data, MYSQL_FIELD *mysql_field) {
//case MYSQL_TYPE_NEWDECIMAL:
return data.toDouble();
case MYSQL_TYPE_NULL:
return null;
return uninit_null();
default:
break;
}
@@ -1592,7 +1592,7 @@ Variant f_mysql_result(CVarRef result, int row,
CopyString);
}
}
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
@@ -1723,7 +1723,7 @@ MySQLFieldInfo *MySQLResult::getFieldInfo(int64_t field) {
Variant MySQLResult::getField(int64_t field) const {
if (!m_localized || field < 0 || field >= (int64_t)m_current_row->size()) {
return null;
return uninit_null();
}
return *(*m_current_row)[field];
}
+2 -2
Ver Arquivo
@@ -1677,7 +1677,7 @@ TypedValue * fg1_mysql_fetch_object(TypedValue* rv, HPHP::VM::ActRec* ar, int64_
break;
}
String defVal1 = "stdClass";
Array defVal2 = null;
Array defVal2 = uninit_null();
fh_mysql_fetch_object((rv), (args-0), (count > 1) ? (Value*)(args-1) : (Value*)(&defVal1), (count > 2) ? (Value*)(args-2) : (Value*)(&defVal2));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -1690,7 +1690,7 @@ TypedValue* fg_mysql_fetch_object(HPHP::VM::ActRec *ar) {
if (count >= 1LL && count <= 3LL) {
if ((count <= 2 || (args-2)->m_type == KindOfArray) && (count <= 1 || IS_STRING_TYPE((args-1)->m_type))) {
String defVal1 = "stdClass";
Array defVal2 = null;
Array defVal2 = uninit_null();
fh_mysql_fetch_object((&(rv)), (args-0), (count > 1) ? (Value*)(args-1) : (Value*)(&defVal1), (count > 2) ? (Value*)(args-2) : (Value*)(&defVal2));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 3);
+34 -34
Ver Arquivo
@@ -266,89 +266,89 @@ Variant f_mysql_async_wait_actionable(CVarRef items, double timeout);
String f_mysql_escape_string(CStrRef unescaped_string);
Variant f_mysql_real_escape_string(CStrRef unescaped_string,
CVarRef link_identifier = null);
CVarRef link_identifier = uninit_null());
inline String f_mysql_get_client_info() {
return String(mysql_get_client_info(), CopyString);
}
inline Variant f_mysql_set_charset(CStrRef charset,
CVarRef link_identifier = null) {
CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return null;
if (!conn) return uninit_null();
return !mysql_set_character_set(conn, charset.data());
}
inline Variant f_mysql_ping(CVarRef link_identifier = null) {
inline Variant f_mysql_ping(CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return null;
if (!conn) return uninit_null();
return !mysql_ping(conn);
}
inline Variant f_mysql_client_encoding(CVarRef link_identifier = null) {
inline Variant f_mysql_client_encoding(CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return false;
return String(mysql_character_set_name(conn), CopyString);
}
inline Variant f_mysql_close(CVarRef link_identifier = null) {
inline Variant f_mysql_close(CVarRef link_identifier = uninit_null()) {
return MySQL::CloseConn(link_identifier);
}
Variant f_mysql_errno(CVarRef link_identifier = null);
Variant f_mysql_errno(CVarRef link_identifier = uninit_null());
Variant f_mysql_error(CVarRef link_identifier = null);
Variant f_mysql_error(CVarRef link_identifier = uninit_null());
Variant f_mysql_warning_count(CVarRef link_identifier = null);
Variant f_mysql_warning_count(CVarRef link_identifier = uninit_null());
inline Variant f_mysql_get_host_info(CVarRef link_identifier = null) {
inline Variant f_mysql_get_host_info(CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return false;
return String(mysql_get_host_info(conn), CopyString);
}
inline Variant f_mysql_get_proto_info(CVarRef link_identifier = null) {
inline Variant f_mysql_get_proto_info(CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return false;
return (int64_t)mysql_get_proto_info(conn);
}
inline Variant f_mysql_get_server_info(CVarRef link_identifier = null) {
inline Variant f_mysql_get_server_info(CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return false;
return String(mysql_get_server_info(conn), CopyString);
}
inline Variant f_mysql_info(CVarRef link_identifier = null) {
inline Variant f_mysql_info(CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return false;
return String(mysql_info(conn), CopyString);
}
inline Variant f_mysql_insert_id(CVarRef link_identifier = null) {
inline Variant f_mysql_insert_id(CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return false;
return static_cast<int64_t>(mysql_insert_id(conn));
}
inline Variant f_mysql_stat(CVarRef link_identifier = null) {
inline Variant f_mysql_stat(CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return false;
return String(mysql_stat(conn), CopyString);
}
inline Variant f_mysql_thread_id(CVarRef link_identifier = null) {
inline Variant f_mysql_thread_id(CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return false;
return (int64_t)mysql_thread_id(conn);
}
inline Variant f_mysql_create_db(CStrRef db,
CVarRef link_identifier = null) {
CVarRef link_identifier = uninit_null()) {
throw NotSupportedException
(__func__, "Deprecated. Use mysql_query(CREATE DATABASE) instead.");
}
inline Variant f_mysql_select_db(CStrRef db,
CVarRef link_identifier = null) {
CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return false;
return mysql_select_db(conn, db.data()) == 0;
}
inline Variant f_mysql_drop_db(CStrRef db,
CVarRef link_identifier = null) {
CVarRef link_identifier = uninit_null()) {
throw NotSupportedException
(__func__, "Deprecated. Use mysql_query(DROP DATABASE) instead.");
}
inline Variant f_mysql_affected_rows(CVarRef link_identifier = null) {
inline Variant f_mysql_affected_rows(CVarRef link_identifier = uninit_null()) {
MYSQL *conn = MySQL::GetConn(link_identifier);
if (!conn) return false;
return static_cast<int64_t>(mysql_affected_rows(conn));
@@ -360,35 +360,35 @@ inline Variant f_mysql_affected_rows(CVarRef link_identifier = null) {
Variant mysql_makevalue(CStrRef data, MYSQL_FIELD *mysql_field);
bool f_mysql_set_timeout(int query_timeout_ms = -1,
CVarRef link_identifier = null);
CVarRef link_identifier = uninit_null());
Variant f_mysql_query(CStrRef query, CVarRef link_identifier = null);
Variant f_mysql_multi_query(CStrRef query, CVarRef link_identifier = null);
Variant f_mysql_query(CStrRef query, CVarRef link_identifier = uninit_null());
Variant f_mysql_multi_query(CStrRef query, CVarRef link_identifier = uninit_null());
bool f_mysql_next_result(CVarRef link_identifier = null);
bool f_mysql_next_result(CVarRef link_identifier = uninit_null());
bool f_mysql_more_results(CVarRef link_identifier = null);
bool f_mysql_more_results(CVarRef link_identifier = uninit_null());
Variant f_mysql_fetch_result(CVarRef link_identifier = null);
Variant f_mysql_fetch_result(CVarRef link_identifier = uninit_null());
Variant f_mysql_unbuffered_query(CStrRef query,
CVarRef link_identifier = null);
CVarRef link_identifier = uninit_null());
inline Variant f_mysql_db_query(CStrRef database, CStrRef query,
CVarRef link_identifier = null) {
CVarRef link_identifier = uninit_null()) {
throw NotSupportedException
(__func__, "Deprecated. Use mysql_query() instead.");
}
Variant f_mysql_list_dbs(CVarRef link_identifier = null);
Variant f_mysql_list_dbs(CVarRef link_identifier = uninit_null());
Variant f_mysql_list_tables(CStrRef database,
CVarRef link_identifier = null);
CVarRef link_identifier = uninit_null());
inline Variant f_mysql_list_fields(CStrRef database_name, CStrRef table_name,
CVarRef link_identifier = null) {
CVarRef link_identifier = uninit_null()) {
throw NotSupportedException
(__func__, "Deprecated. Use mysql_query(SHOW COLUMNS FROM table "
"[LIKE 'name']) instead.");
}
Variant f_mysql_list_processes(CVarRef link_identifier = null);
Variant f_mysql_list_processes(CVarRef link_identifier = uninit_null());
///////////////////////////////////////////////////////////////////////////////
// row operations
@@ -404,7 +404,7 @@ Variant f_mysql_fetch_array(CVarRef result, int result_type = 3);
Variant f_mysql_fetch_lengths(CVarRef result);
Variant f_mysql_fetch_object(CVarRef result, CStrRef class_name = "stdClass",
CArrRef params = null);
CArrRef params = uninit_null());
Variant f_mysql_result(CVarRef result, int row, CVarRef field = null_variant);
+8 -8
Ver Arquivo
@@ -713,8 +713,8 @@ TypedValue * fg1_dns_get_record(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t co
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
VRefParamValue defVal2 = null;
VRefParamValue defVal3 = null;
VRefParamValue defVal2 = uninit_null();
VRefParamValue defVal3 = uninit_null();
fh_dns_get_record((rv), (Value*)(args-0), (count > 1) ? (int)(args[-1].m_data.num) : (int)(-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (args-3) : (TypedValue*)(&defVal3));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -726,8 +726,8 @@ TypedValue* fg_dns_get_record(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 1LL && count <= 4LL) {
if ((count <= 1 || (args-1)->m_type == KindOfInt64) && IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal2 = null;
VRefParamValue defVal3 = null;
VRefParamValue defVal2 = uninit_null();
VRefParamValue defVal3 = uninit_null();
fh_dns_get_record((&(rv)), (Value*)(args-0), (count > 1) ? (int)(args[-1].m_data.num) : (int)(-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (args-3) : (TypedValue*)(&defVal3));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 4);
@@ -769,7 +769,7 @@ TypedValue * fg1_dns_get_mx(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count)
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
rv->m_type = KindOfBoolean;
tvCastToStringInPlace(args-0);
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
rv->m_data.num = (fh_dns_get_mx((Value*)(args-0), (args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2))) ? 1LL : 0LL;
return rv;
}
@@ -781,7 +781,7 @@ TypedValue* fg_dns_get_mx(HPHP::VM::ActRec *ar) {
if (count >= 2LL && count <= 3LL) {
if (IS_STRING_TYPE((args-0)->m_type)) {
rv.m_type = KindOfBoolean;
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
rv.m_data.num = (fh_dns_get_mx((Value*)(args-0), (args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2))) ? 1LL : 0LL;
frame_free_locals_no_this_inl(ar, 3);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
@@ -1004,8 +1004,8 @@ TypedValue* fg_headers_sent(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count <= 2LL) {
rv.m_type = KindOfBoolean;
VRefParamValue defVal0 = null;
VRefParamValue defVal1 = null;
VRefParamValue defVal0 = uninit_null();
VRefParamValue defVal1 = uninit_null();
rv.m_data.num = (fh_headers_sent((count > 0) ? (args-0) : (TypedValue*)(&defVal0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1))) ? 1LL : 0LL;
frame_free_locals_no_this_inl(ar, 2);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
+9 -9
Ver Arquivo
@@ -44,24 +44,24 @@ inline bool f_checkdnsrr(CStrRef host, CStrRef type = null_string) {
return f_dns_check_record(host, type);
}
Variant f_dns_get_record(CStrRef hostname, int type = -1, VRefParam authns = null,
VRefParam addtl = null);
Variant f_dns_get_record(CStrRef hostname, int type = -1, VRefParam authns = uninit_null(),
VRefParam addtl = uninit_null());
bool f_dns_get_mx(CStrRef hostname, VRefParam mxhosts, VRefParam weights = null);
bool f_dns_get_mx(CStrRef hostname, VRefParam mxhosts, VRefParam weights = uninit_null());
inline bool f_getmxrr(CStrRef hostname, VRefParam mxhosts,
VRefParam weight = null) {
VRefParam weight = uninit_null()) {
return f_dns_get_mx(hostname, ref(mxhosts), weight);
}
///////////////////////////////////////////////////////////////////////////////
// socket
Variant f_fsockopen(CStrRef hostname, int port = -1, VRefParam errnum = null,
VRefParam errstr = null, double timeout = 0.0);
Variant f_fsockopen(CStrRef hostname, int port = -1, VRefParam errnum = uninit_null(),
VRefParam errstr = uninit_null(), double timeout = 0.0);
Variant f_pfsockopen(CStrRef hostname, int port = -1, VRefParam errnum = null,
VRefParam errstr = null, double timeout = 0.0);
Variant f_pfsockopen(CStrRef hostname, int port = -1, VRefParam errnum = uninit_null(),
VRefParam errstr = uninit_null(), double timeout = 0.0);
inline Variant f_socket_get_status(CObjRef stream) {
return f_stream_get_meta_data(stream);
@@ -85,7 +85,7 @@ Variant f_http_response_code(int response_code = 0);
Array f_headers_list();
bool f_headers_sent(VRefParam file = null, VRefParam line = null);
bool f_headers_sent(VRefParam file = uninit_null(), VRefParam line = uninit_null());
bool f_header_register_callback(CVarRef callback);
+2 -2
Ver Arquivo
@@ -99,7 +99,7 @@ Variant f_assert(CVarRef assertion) {
if (s_option_data->assertBail) {
throw Assertion();
}
return null;
return uninit_null();
}
int64_t f_dl(CStrRef library) {
@@ -973,7 +973,7 @@ Variant f_version_compare(CStrRef version1, CStrRef version2,
!strncmp(op, "ne", op_len)) {
return compare != 0;
}
return null;
return uninit_null();
}
bool f_gc_enabled() {
+2 -2
Ver Arquivo
@@ -294,7 +294,7 @@ TypedValue * fg1_hphp_set_hardware_events(TypedValue* rv, HPHP::VM::ActRec* ar,
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
rv->m_type = KindOfBoolean;
tvCastToStringInPlace(args-0);
String defVal0 = null;
String defVal0 = uninit_null();
rv->m_data.num = (fh_hphp_set_hardware_events((count > 0) ? (Value*)(args-0) : (Value*)(&defVal0))) ? 1LL : 0LL;
return rv;
}
@@ -306,7 +306,7 @@ TypedValue* fg_hphp_set_hardware_events(HPHP::VM::ActRec *ar) {
if (count <= 1LL) {
if ((count <= 0 || IS_STRING_TYPE((args-0)->m_type))) {
rv.m_type = KindOfBoolean;
String defVal0 = null;
String defVal0 = uninit_null();
rv.m_data.num = (fh_hphp_set_hardware_events((count > 0) ? (Value*)(args-0) : (Value*)(&defVal0))) ? 1LL : 0LL;
frame_free_locals_no_this_inl(ar, 1);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
+1 -1
Ver Arquivo
@@ -24,7 +24,7 @@
namespace HPHP {
///////////////////////////////////////////////////////////////////////////////
inline bool f_ob_start(CVarRef output_callback = null, int chunk_size = 0,
inline bool f_ob_start(CVarRef output_callback = uninit_null(), int chunk_size = 0,
bool erase = true) {
// ignoring chunk_size and erase
g_context->obStart(output_callback);
+29 -29
Ver Arquivo
@@ -930,12 +930,12 @@ void c_PDO::t___construct(CStrRef dsn, CStrRef username /* = null_string */,
String name = "pdo.dsn."; name += data_source;
String ini_dsn;
if (!IniSetting::Get(name, ini_dsn)) {
throw_pdo_exception(null, null, "invalid data source name");
throw_pdo_exception(uninit_null(), uninit_null(), "invalid data source name");
}
data_source = ini_dsn;
colon = strchr(data_source.data(), ':');
if (!colon) {
throw_pdo_exception(null, null, "invalid data source name (via INI: %s)",
throw_pdo_exception(uninit_null(), uninit_null(), "invalid data source name (via INI: %s)",
ini_dsn.data());
}
}
@@ -944,12 +944,12 @@ void c_PDO::t___construct(CStrRef dsn, CStrRef username /* = null_string */,
/* the specified URI holds connection details */
Variant stream = File::Open(data_source.substr(4), "rb");
if (same(stream, false)) {
throw_pdo_exception(null, null, "invalid data source URI");
throw_pdo_exception(uninit_null(), uninit_null(), "invalid data source URI");
}
data_source = stream.toObject().getTyped<File>()->readLine(1024);
colon = strchr(data_source.data(), ':');
if (!colon) {
throw_pdo_exception(null, null, "invalid data source name (via URI)");
throw_pdo_exception(uninit_null(), uninit_null(), "invalid data source name (via URI)");
}
}
@@ -959,7 +959,7 @@ void c_PDO::t___construct(CStrRef dsn, CStrRef username /* = null_string */,
if (iter == drivers.end()) {
/* NB: don't want to include the data_source in the error message as
* it might contain a password */
throw_pdo_exception(null, null, "could not find driver");
throw_pdo_exception(uninit_null(), uninit_null(), "could not find driver");
}
PDODriver *driver = iter->second;
@@ -1013,7 +1013,7 @@ void c_PDO::t___construct(CStrRef dsn, CStrRef username /* = null_string */,
/* need a brand new pdbh */
m_dbh = driver->createConnection(colon+1, username, password, options);
if (m_dbh.get() == NULL) {
throw_pdo_exception(null, null, "unable to create a connection");
throw_pdo_exception(uninit_null(), uninit_null(), "unable to create a connection");
}
m_dbh->persistent_id = string(shashkey.data(), shashkey.size());
}
@@ -1022,7 +1022,7 @@ void c_PDO::t___construct(CStrRef dsn, CStrRef username /* = null_string */,
if (!m_dbh.get()) {
m_dbh = driver->createConnection(colon+1, username, password, options);
if (m_dbh.get() == NULL) {
throw_pdo_exception(null, null, "unable to create a connection");
throw_pdo_exception(uninit_null(), uninit_null(), "unable to create a connection");
}
}
@@ -1100,7 +1100,7 @@ Variant c_PDO::t_prepare(CStrRef statement,
bool c_PDO::t_begintransaction() {
if (m_dbh->in_txn) {
throw_pdo_exception(null, null, "There is already an active transaction");
throw_pdo_exception(uninit_null(), uninit_null(), "There is already an active transaction");
}
if (m_dbh->begin()) {
m_dbh->in_txn = 1;
@@ -1115,7 +1115,7 @@ bool c_PDO::t_begintransaction() {
bool c_PDO::t_commit() {
assert(m_dbh->driver);
if (!m_dbh->in_txn) {
throw_pdo_exception(null, null, "There is no active transaction");
throw_pdo_exception(uninit_null(), uninit_null(), "There is no active transaction");
}
if (m_dbh->commit()) {
m_dbh->in_txn = 0;
@@ -1128,7 +1128,7 @@ bool c_PDO::t_commit() {
bool c_PDO::t_rollback() {
assert(m_dbh->driver);
if (!m_dbh->in_txn) {
throw_pdo_exception(null, null, "There is no active transaction");
throw_pdo_exception(uninit_null(), uninit_null(), "There is no active transaction");
}
if (m_dbh->rollback()) {
m_dbh->in_txn = 0;
@@ -1241,7 +1241,7 @@ bool c_PDO::t_setattribute(int64_t attribute, CVarRef value) {
}
if (attribute == PDO_ATTR_AUTOCOMMIT) {
throw_pdo_exception(null, null,
throw_pdo_exception(uninit_null(), uninit_null(),
"The auto-commit mode cannot be changed for this "
"driver");
} else if (!m_dbh->support(PDOConnection::MethodSetAttribute)) {
@@ -1351,7 +1351,7 @@ Variant c_PDO::t_errorcode() {
}
if (m_dbh->error_code[0] == '\0') {
return null;
return uninit_null();
}
/**
@@ -1385,7 +1385,7 @@ Array c_PDO::t_errorinfo() {
if (error_expected_count > error_count) {
int error_count_diff = error_expected_count - error_count;
for (int i = 0; i < error_count_diff; i++) {
ret.append(null);
ret.append(uninit_null());
}
}
return ret;
@@ -1402,7 +1402,7 @@ Variant c_PDO::t_query(CStrRef sql) {
pdo_raise_impl_error
(m_dbh, NULL, "HY000",
"failed to instantiate user supplied statement class");
return null;
return uninit_null();
}
c_PDOStatement *pdostmt = ret.getTyped<c_PDOStatement>();
@@ -1415,7 +1415,7 @@ Variant c_PDO::t_query(CStrRef sql) {
stmt->default_fetch_type = m_dbh->default_fetch_type;
stmt->active_query_string = stmt->query_string;
stmt->dbh = m_dbh;
stmt->lazy_object_ref = null;
stmt->lazy_object_ref = uninit_null();
strcpy(stmt->error_code, PDO_ERR_NONE);
@@ -1469,15 +1469,15 @@ Variant c_PDO::t_quote(CStrRef str, int64_t paramtype /* = q_PDO$$PARAM_STR */)
}
Variant c_PDO::t___wakeup() {
throw_pdo_exception(null, null,
throw_pdo_exception(uninit_null(), uninit_null(),
"You cannot serialize or unserialize PDO instances");
return null;
return uninit_null();
}
Variant c_PDO::t___sleep() {
throw_pdo_exception(null, null,
throw_pdo_exception(uninit_null(), uninit_null(),
"You cannot serialize or unserialize PDO instances");
return null;
return uninit_null();
}
Array c_PDO::ti_getavailabledrivers(const char* cls) {
@@ -1661,7 +1661,7 @@ static inline void fetch_value(sp_PDOStatement stmt, Variant &dest, int colno,
case PDO_PARAM_INT: dest = dest.toInt64(); break;
case PDO_PARAM_BOOL: dest = dest.toBoolean(); break;
case PDO_PARAM_STR: dest = dest.toString(); break;
case PDO_PARAM_NULL: dest = null; break;
case PDO_PARAM_NULL: dest = uninit_null(); break;
}
}
if (stmt->dbh->stringify && (dest.isInteger() || dest.isDouble())) {
@@ -2878,7 +2878,7 @@ Variant c_PDOStatement::t_fetchall(int64_t how /* = 0 */,
bool c_PDOStatement::t_bindvalue(CVarRef paramno, CVarRef param,
int64_t type /* = q_PDO$$PARAM_STR */) {
return register_bound_param(paramno, param, type, 0, null, m_stmt, true);
return register_bound_param(paramno, param, type, 0, uninit_null(), m_stmt, true);
}
bool c_PDOStatement::t_bindparam(CVarRef paramno, VRefParam param,
@@ -2903,7 +2903,7 @@ int64_t c_PDOStatement::t_rowcount() {
Variant c_PDOStatement::t_errorcode() {
if (m_stmt->error_code[0] == '\0') {
return null;
return uninit_null();
}
return String(m_stmt->error_code, CopyString);
}
@@ -2921,7 +2921,7 @@ Array c_PDOStatement::t_errorinfo() {
if (error_expected_count > error_count) {
int error_count_diff = error_expected_count - error_count;
for (int i = 0; i < error_count_diff; i++) {
ret.append(null);
ret.append(uninit_null());
}
}
return ret;
@@ -3112,13 +3112,13 @@ Variant c_PDOStatement::t_next() {
} else {
++m_rowIndex;
}
return null;
return uninit_null();
}
Variant c_PDOStatement::t_rewind() {
m_rowIndex = -1;
t_next();
return null;
return uninit_null();
}
Variant c_PDOStatement::t_valid() {
@@ -3126,15 +3126,15 @@ Variant c_PDOStatement::t_valid() {
}
Variant c_PDOStatement::t___wakeup() {
throw_pdo_exception(null, null, "You cannot serialize or unserialize "
throw_pdo_exception(uninit_null(), uninit_null(), "You cannot serialize or unserialize "
"PDOStatement instances");
return null;
return uninit_null();
}
Variant c_PDOStatement::t___sleep() {
throw_pdo_exception(null, null, "You cannot serialize or unserialize "
throw_pdo_exception(uninit_null(), uninit_null(), "You cannot serialize or unserialize "
"PDOStatement instances");
return null;
return uninit_null();
}
///////////////////////////////////////////////////////////////////////////////
+4 -4
Ver Arquivo
@@ -156,12 +156,12 @@ class c_PDOStatement : public ExtObjectData, public Sweepable {
public: void t___construct();
public: Variant t_execute(CArrRef params = null_array);
public: Variant t_fetch(int64_t how = 0, int64_t orientation = q_PDO$$FETCH_ORI_NEXT, int64_t offset = 0);
public: Variant t_fetchobject(CStrRef class_name = null_string, CVarRef ctor_args = null);
public: Variant t_fetchobject(CStrRef class_name = null_string, CVarRef ctor_args = uninit_null());
public: Variant t_fetchcolumn(int64_t column_numner = 0);
public: Variant t_fetchall(int64_t how = 0, CVarRef class_name = null, CVarRef ctor_args = null);
public: Variant t_fetchall(int64_t how = 0, CVarRef class_name = uninit_null(), CVarRef ctor_args = uninit_null());
public: bool t_bindvalue(CVarRef paramno, CVarRef param, int64_t type = q_PDO$$PARAM_STR);
public: bool t_bindparam(CVarRef paramno, VRefParam param, int64_t type = q_PDO$$PARAM_STR, int64_t max_value_len = 0, CVarRef driver_params = null);
public: bool t_bindcolumn(CVarRef paramno, VRefParam param, int64_t type = q_PDO$$PARAM_STR, int64_t max_value_len = 0, CVarRef driver_params = null);
public: bool t_bindparam(CVarRef paramno, VRefParam param, int64_t type = q_PDO$$PARAM_STR, int64_t max_value_len = 0, CVarRef driver_params = uninit_null());
public: bool t_bindcolumn(CVarRef paramno, VRefParam param, int64_t type = q_PDO$$PARAM_STR, int64_t max_value_len = 0, CVarRef driver_params = uninit_null());
public: int64_t t_rowcount();
public: Variant t_errorcode();
public: Array t_errorinfo();
+10 -10
Ver Arquivo
@@ -126,7 +126,7 @@ TypedValue * fg1_preg_match(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count)
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_preg_match((rv), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (int)(args[-3].m_data.num) : (int)(0), (count > 4) ? (int)(args[-4].m_data.num) : (int)(0));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -138,7 +138,7 @@ TypedValue* fg_preg_match(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 2LL && count <= 5LL) {
if ((count <= 4 || (args-4)->m_type == KindOfInt64) && (count <= 3 || (args-3)->m_type == KindOfInt64) && IS_STRING_TYPE((args-1)->m_type) && IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_preg_match((&(rv)), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2), (count > 3) ? (int)(args[-3].m_data.num) : (int)(0), (count > 4) ? (int)(args[-4].m_data.num) : (int)(0));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 5);
@@ -253,7 +253,7 @@ TypedValue * fg1_preg_replace(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t coun
TypedValue * fg1_preg_replace(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
tvCastToInt64InPlace(args-3);
VRefParamValue defVal4 = null;
VRefParamValue defVal4 = uninit_null();
fh_preg_replace((rv), (args-0), (args-1), (args-2), (count > 3) ? (int)(args[-3].m_data.num) : (int)(-1), (count > 4) ? (args-4) : (TypedValue*)(&defVal4));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -265,7 +265,7 @@ TypedValue* fg_preg_replace(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 3LL && count <= 5LL) {
if ((count <= 3 || (args-3)->m_type == KindOfInt64)) {
VRefParamValue defVal4 = null;
VRefParamValue defVal4 = uninit_null();
fh_preg_replace((&(rv)), (args-0), (args-1), (args-2), (count > 3) ? (int)(args[-3].m_data.num) : (int)(-1), (count > 4) ? (args-4) : (TypedValue*)(&defVal4));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 5);
@@ -309,7 +309,7 @@ TypedValue * fg1_preg_replace_callback(TypedValue* rv, HPHP::VM::ActRec* ar, int
TypedValue * fg1_preg_replace_callback(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
tvCastToInt64InPlace(args-3);
VRefParamValue defVal4 = null;
VRefParamValue defVal4 = uninit_null();
fh_preg_replace_callback((rv), (args-0), (args-1), (args-2), (count > 3) ? (int)(args[-3].m_data.num) : (int)(-1), (count > 4) ? (args-4) : (TypedValue*)(&defVal4));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -321,7 +321,7 @@ TypedValue* fg_preg_replace_callback(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 3LL && count <= 5LL) {
if ((count <= 3 || (args-3)->m_type == KindOfInt64)) {
VRefParamValue defVal4 = null;
VRefParamValue defVal4 = uninit_null();
fh_preg_replace_callback((&(rv)), (args-0), (args-1), (args-2), (count > 3) ? (int)(args[-3].m_data.num) : (int)(-1), (count > 4) ? (args-4) : (TypedValue*)(&defVal4));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 5);
@@ -656,7 +656,7 @@ TypedValue * fg1_ereg(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_ereg((rv), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -668,7 +668,7 @@ TypedValue* fg_ereg(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 2LL && count <= 3LL) {
if (IS_STRING_TYPE((args-1)->m_type) && IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_ereg((&(rv)), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 3);
@@ -720,7 +720,7 @@ TypedValue * fg1_eregi(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
if (!IS_STRING_TYPE((args-0)->m_type)) {
tvCastToStringInPlace(args-0);
}
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_eregi((rv), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv->m_type == KindOfUninit) rv->m_type = KindOfNull;
return rv;
@@ -732,7 +732,7 @@ TypedValue* fg_eregi(HPHP::VM::ActRec *ar) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
if (count >= 2LL && count <= 3LL) {
if (IS_STRING_TYPE((args-1)->m_type) && IS_STRING_TYPE((args-0)->m_type)) {
VRefParamValue defVal2 = null;
VRefParamValue defVal2 = uninit_null();
fh_eregi((&(rv)), (Value*)(args-0), (Value*)(args-1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv.m_type == KindOfUninit) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 3);
+5 -5
Ver Arquivo
@@ -28,18 +28,18 @@ namespace HPHP {
Variant f_preg_grep(CStrRef pattern, CArrRef input, int flags = 0);
Variant f_preg_match(CStrRef pattern, CStrRef subject, VRefParam matches = null,
Variant f_preg_match(CStrRef pattern, CStrRef subject, VRefParam matches = uninit_null(),
int flags = 0, int offset = 0);
Variant f_preg_match_all(CStrRef pattern, CStrRef subject, VRefParam matches,
int flags = 0, int offset = 0);
Variant f_preg_replace(CVarRef pattern, CVarRef replacement, CVarRef subject,
int limit = -1, VRefParam count = null);
int limit = -1, VRefParam count = uninit_null());
Variant f_preg_replace_callback(CVarRef pattern, CVarRef callback,
CVarRef subject, int limit = -1,
VRefParam count = null);
VRefParam count = uninit_null());
Variant f_preg_split(CVarRef pattern, CVarRef subject, int limit = -1,
int flags = 0);
@@ -53,8 +53,8 @@ int64_t f_preg_last_error();
String f_ereg_replace(CStrRef pattern, CStrRef replacement, CStrRef str);
String f_eregi_replace(CStrRef pattern, CStrRef replacement, CStrRef str);
Variant f_ereg(CStrRef pattern, CStrRef str, VRefParam regs = null);
Variant f_eregi(CStrRef pattern, CStrRef str, VRefParam regs = null);
Variant f_ereg(CStrRef pattern, CStrRef str, VRefParam regs = uninit_null());
Variant f_eregi(CStrRef pattern, CStrRef str, VRefParam regs = uninit_null());
Variant f_split(CStrRef pattern, CStrRef str, int limit = -1);
Variant f_spliti(CStrRef pattern, CStrRef str, int limit = -1);
String f_sql_regcase(CStrRef str);
+8 -8
Ver Arquivo
@@ -523,8 +523,8 @@ TypedValue * fg1_exec(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
rv->m_type = KindOfString;
tvCastToStringInPlace(args-0);
VRefParamValue defVal1 = null;
VRefParamValue defVal2 = null;
VRefParamValue defVal1 = uninit_null();
VRefParamValue defVal2 = uninit_null();
fh_exec((Value*)(rv), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv->m_data.num == 0LL) rv->m_type = KindOfNull;
return rv;
@@ -537,8 +537,8 @@ TypedValue* fg_exec(HPHP::VM::ActRec *ar) {
if (count >= 1LL && count <= 3LL) {
if (IS_STRING_TYPE((args-0)->m_type)) {
rv.m_type = KindOfString;
VRefParamValue defVal1 = null;
VRefParamValue defVal2 = null;
VRefParamValue defVal1 = uninit_null();
VRefParamValue defVal2 = uninit_null();
fh_exec((Value*)(&(rv)), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1), (count > 2) ? (args-2) : (TypedValue*)(&defVal2));
if (rv.m_data.num == 0LL) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 3);
@@ -579,7 +579,7 @@ TypedValue * fg1_passthru(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
rv->m_data.num = 0LL;
rv->m_type = KindOfNull;
tvCastToStringInPlace(args-0);
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
fh_passthru((Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1));
return rv;
}
@@ -592,7 +592,7 @@ TypedValue* fg_passthru(HPHP::VM::ActRec *ar) {
if (IS_STRING_TYPE((args-0)->m_type)) {
rv.m_data.num = 0LL;
rv.m_type = KindOfNull;
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
fh_passthru((Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1));
frame_free_locals_no_this_inl(ar, 2);
memcpy(&ar->m_r, &rv, sizeof(TypedValue));
@@ -633,7 +633,7 @@ TypedValue * fg1_system(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) {
TypedValue* args UNUSED = ((TypedValue*)ar) - 1;
rv->m_type = KindOfString;
tvCastToStringInPlace(args-0);
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
fh_system((Value*)(rv), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1));
if (rv->m_data.num == 0LL) rv->m_type = KindOfNull;
return rv;
@@ -646,7 +646,7 @@ TypedValue* fg_system(HPHP::VM::ActRec *ar) {
if (count >= 1LL && count <= 2LL) {
if (IS_STRING_TYPE((args-0)->m_type)) {
rv.m_type = KindOfString;
VRefParamValue defVal1 = null;
VRefParamValue defVal1 = uninit_null();
fh_system((Value*)(&(rv)), (Value*)(args-0), (count > 1) ? (args-1) : (TypedValue*)(&defVal1));
if (rv.m_data.num == 0LL) rv.m_type = KindOfNull;
frame_free_locals_no_this_inl(ar, 2);

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais