in my script there is an error
Notice: Undefined index: adObjID in /home/reffsite/xxxx.com/sell-edit-item.php on line 28
I don't know what is the problem for real since im not good in coding
/* Variables */
$adObjID = $_GET['adObjID'];
$adObj = new ParseObject('Ads', $adObjID);
$adObj->fetch();
this is the line 28
anyone can help me solve this please
You must be Missing the GET in browser when visiting the link.
http://someurl.com?adObjID=something
Your URL Must have adObjID as a GET variable!
Related
I am getting hundreds of from ANSI.php. Here is an example:
/usr/share/pear/File/ANSI.php on line 553 Notice: Undefined offset: 75 in
/usr/share/pear/File/ANSI.php on line 555 Notice: Undefined offset: 76 in
/usr/share/pear/File/ANSI.php on line 553 Notice: Undefined offset: 76 in
/usr/share/pear/File/ANSI.php on line 555 Notice: Undefined offset: 77 in
/usr/share/pear/File/ANSI.php on line 555 Notice: Trying to get property of non-object in
/usr/share/pear/File/ANSI.php on line 496 Notice: Trying to get property of non-object in
This is generating from:
$ansi->appendString($ssh->read());
Everything is working. I suspect the old machines I am working with are giving ANSI.php a hard time.
Is there a way i can disable just the error messages from ANSI.PHP and keep the others? Unless someone has a way of fixing the error.
Simplest Solution (Sub-Optimal)
I guess the simplest way to suppress the errors would be to use the error suppression operator #. eg.
#$ansi->appendString($str);
Optimal Solution (Possibly)
There have been two commits to phpseclib since the latest release (1.0.7 and 2.0.6, as of this post) that fixed issues with File/ANSI.php:
https://github.com/phpseclib/phpseclib/commit/5c792f6bc1fa8a5d26b43fb8200191c073637e15
https://github.com/phpseclib/phpseclib/commit/84d1628cb7734134b1ba80545b38985025942b79
More info:
https://github.com/phpseclib/phpseclib/issues/1161
https://github.com/phpseclib/phpseclib/issues/1150
Kinda makes me wonder if one of those might fix the issue for you.
Fallback to Optimal Solution
If the previously mentioned "optimal solution" doesn't fix the issue for you then it would be nice to fix the problem at the source. What'd help me do that would be a copy of the data you got before you passed it to $ansi->appendString(). To make it so the characters don't get garbled because they're extended ASCII maybe hex encode it. eg. echo bin2hex($ssh->read()); or something.
currently Developing a website for my local isp, anyway they want a speed test, soo oolka net gauge is out of the question so i chose http://www.v-speed.eu I quite like their UI but anyway i get these errors on the main page
Notice: Undefined index: link in C:\xampp\htdocs\speed\index.php on
line 48
Notice: Undefined variable: cond in
C:\xampp\htdocs\speed_class\class.core.php on line 961
Notice: Undefined variable: cond in
C:\xampp\htdocs\speed_class\class.core.php on line 990
Notice: Undefined offset: 5 in
C:\xampp\htdocs\speed_class\class.core.php on line 1022
Couldn't figure it out
http://pastebin.com/s1tMEMaf
Just want to fix this
$sql = "
SELECT
COUNT(id) AS count
FROM
boxes
WHERE
1 ".$cond."
ORDER BY
order ASC
";
well You are using a variable ($cond) in a method where it is not defined yet.
How are you suppose to append something to something that is not there. (starting on line 948 )
You might want to start with $cond = "";
or
if($text) $cond = " AND (`name` LIKE :text)";
Your undefined offset on 1022 means that your probably get NULL on a key that you are trying to get that does not exist.
As Rahul stated, you should read the error messages properly. The errors you mention tell a lot already and should give enough information for you to debug it.
I am getting this PHP error:
Notice: Undefined offset: 0 in D:\MYBLOG\InstantWP_4.3.1\iwpserver\htdocs\wordpress\wp-content\themes\MYBLOG\admin\library\engines\typography-engine.php on line 32
Notice: Undefined offset: 1 in D:\MYBLOG\InstantWP_4.3.1\iwpserver\htdocs\wordpress\wp-content\themes\MYBLOG\admin\library\engines\typography-engine.php on line 32
Here is the PHP code that throws it:
/* Check stored against current to make sure we don't display deleted css */
if(is_array($custom_fonts)):
foreach($custom_fonts as $id => $font):
if(!$current_custom[$id])unset($custom_fonts[$id]);
endforeach;
endif;
$css = '';
LINE 32 IS HERE:
if(!$current_custom[$id])unset($custom_fonts[$id]);
What does this error mean? What causes this error?
Is there a quick fix to resolve these error?
Really appreciate for any help
Thank you
Replace the 32 line with this:
if(empty($current_custom[$id]) || !$current_custom[$id])unset($custom_fonts[$id]);
There is not a real problem, only a notice (=advice, not error, not warning) which tells you that the $id does not actually exists in the $current_custom array. As the coded tries to unsed the $current_custom[$id] if it is evaluated as false (null, zero, empty string, ...) it is just fine.
Can anyone help me with this error? When running the site on my host i get no errors but when i run it with xampp on my pc i get this
Notice: Undefined offset: 1 in C:\xampp1\htdocs\ctcoun1kk\countrycheck.php on line 273
Notice: Undefined offset: 2 in C:\xampp1\htdocs\ctcoun1kk\countrycheck.php on line 273
Notice: Undefined offset: 3 in C:\xampp1\htdocs\ctcoun1kk\countrycheck.php on line 273
Line 273 is this one->
$decip = ($numbers[0]*16777216)+($numbers[1]*65536)+($numbers[2]*256)+($numbers[3]);
function x_dot2dec($dotip) {
$numbers = preg_split( "/./", $dotip);
$decip = ($numbers[0]*16777216)+($numbers[1]*65536)+($numbers[2]*256)+($numbers[3]);
return array ($decip, $numbers[0]);
}
Thank you for any help :)
It means that $numbers variable is not set properly. Before 273 line put:
var_dump($numbers);
and check if indexes 0,1,2 and 3 are set
Those are just notices. The script should work fine if you ignore thos. Set error reporting level using error_reporting (http://www.php.net/manual/en/function.error-reporting.php) and those will go away. This is set on your other server- that's why you don't see these "errors".
error_reporting(0); //disable all errors and notices
I am new to drupal theme . I have created a direcory mytheme and added mytheme.info to it and copied other files from drupal's default theme directory . Now after editing the page.tpl.php, drupal is showing the errors below .
Notice: Undefined variable: hide_site_name in include() (line 99 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
Notice: Undefined variable: hide_site_name in include() (line 109 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
Notice: Undefined index: featured in include() (line 168 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
Notice: Undefined index: highlighted in include() (line 187 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
Notice: Undefined index: sidebar_second in include() (line 212 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
Notice: Undefined index: triptych_first in include() (line 220 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
Notice: Undefined index: triptych_middle in include() (line 220 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
Notice: Undefined index: triptych_last in include() (line 220 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
Notice: Undefined index: footer_firstcolumn in include() (line 230 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
Notice: Undefined index: footer_secondcolumn in include() (line 230 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
Notice: Undefined index: footer_thirdcolumn in include() (line 230 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
Notice: Undefined index: footer_fourthcolumn in include() (line 230 of C:\wamp\www\dtest\sites\all\themes\mytheme\bartik\templates\page.tpl.php).
After searching on google, I have found that clearing cache will solve the problem . But even after clearing my cache,it remains the same !
Generally these errors occurred when you call a region in your page.tpl.php file that doesn't exist in the theme's .info file.
In your page.tpl.php:
$page['footer_firstcolumn'];
In your theme's .info:
regions[footer_firstcolumn] = Footer first column
After rechecking all regions, don't forget to flush the cache.
If you want to create a fresh theme best practice is to use something like Zen. It's blank and fully customizable.
As long as you follow the prescribed instructions, you will avoid nasty errors like the ones you have above
i had almost the same problem of messages saying "Notice: undefined index: myIndex in include() (line n in some/path/myPage.tpl.php)" whe i was coding my custom sub-template
I kind of solved the problem using php's function isset() for every line told in the Notice message.
For example in your line 99 i would use:
if(isset(hide_site_name)){
//use hide_site_name in the normal way
}
or in your line 168
if(isset( some_var[featured] )){
//use "featured" index in the normal way
}
hope this helps someone as this helped me after a long time searching for a solution.
i never found the cause of this behavior btw.
sorry for bad grammar, if there's any.
I had the same problem after creating a sub theme and I followed the answer by Meiker and it worked great about including isset. But as I do not have a lot of experience with programing I ran into a snag with line 220 and multiple triptych in the same line.
Notice: Undefined index: triptych_first in include() (line 220 of
C:\wamp\www\dtest\sites\all\themes
So I added isset like this:
if(isset($page['triptych_first']) || (isset($page['triptych_middle']) || (isset($page['triptych_last'])))) :
and did the same for similar error lines and now I do not have any more errors appearing.
I hope this helps others who are programming challenged.