The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 16, 2019, 05:09:50 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Shared host gives error on &$arg=null  (Read 2980 times)
nattsurfaren
Journeyman
***
Offline Offline

Posts: 64


View Profile
« on: September 30, 2008, 02:17:45 PM »

Code:
function InitSettings(&$cookie, &$proxy, &$proxyport, &$agent = null)
{
}

if I change to
Code:
function InitSettings(&$cookie, &$proxy, &$proxyport, &$agent)
{
}

Then it works. Don't know why this is.
When I run this locally it works fine with the optional parameter.

/Natt
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: September 30, 2008, 02:39:50 PM »

try &$arg=false and see if that fixes it. I wonder how the interpreter would take setting a default value to a passed-by-reference variable that you want to null - essentially unset. A bit to weird I think.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #2 on: September 30, 2008, 03:23:59 PM »

or set it to ''
i have had funkyness with default args and find setting it to '' works slightly more predictably
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #3 on: September 30, 2008, 04:25:59 PM »

i have had funkyness with default args and find setting it to '' works slightly more predictably

... more than [false]? What kind of funkiness?
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #4 on: September 30, 2008, 05:38:06 PM »

i guess I should say when related to strings. false is not blank.
false works fine though of course.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
nattsurfaren
Journeyman
***
Offline Offline

Posts: 64


View Profile
« Reply #5 on: October 01, 2008, 11:08:17 AM »

Thanks for your help Perk and Nutballs.  Praise
Logged
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!