473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to fix "undefined index: regexp code on line 1"

11
Hello, I am getting a Notice error on my website that says:
Notice: Undefined index: _created_formatted in C:\EasyPHP1-8\www\eP\components\com_jambook\jxtemplate.php(125 ) : regexp code on line 1

but I don't know what it means..I have no index _created_formatted on my php page and I can't find my mistake..Can someone help me with this?Which part of my code should I see for mistakes, and what kind of mistakes might these be?When I used to run my site on my local server, there was no problem, once I inserted it online, it created this Notice error. Thank you in advance for your time!
Mar 17 '08 #1
4 7671
rpnew
188 100+
Hello, I am getting a Notice error on my website that says:
Notice: Undefined index: _created_formatted in C:\EasyPHP1-8\www\eP\components\com_jambook\jxtemplate.php(125 ) : regexp code on line 1

but I don't know what it means..I have no index _created_formatted on my php page and I can't find my mistake..Can someone help me with this?Which part of my code should I see for mistakes, and what kind of mistakes might these be?When I used to run my site on my local server, there was no problem, once I inserted it online, it created this Notice error. Thank you in advance for your time!
Hi,
Can you post your page code snap here..

Regards,
RP
Mar 17 '08 #2
ronverdonk
4,258 Expert 4TB
All it means is that the named index key does not exist. But note that is is just a notice, not an error! Your script will survive and won't crash. But is it, of course, a nuisance. Are you certain that you do not have or do not call or execute a script with that name defined?
If not, then the error is most likely in a script that you use from 3rd party software, like you have.

When not any of the above, show some code. And do it within the appropriate code tags according to the Posting Guidelines.

Ronald
Mar 17 '08 #3
mariaz
11
I think the mistake must be in this function, it is the last function of the php file:

Expand|Select|Wrap|Line Numbers
  1. function parseTemplate( $variables="", $tmpl="" ) {
  2.         if ( $tmpl ) {
  3.             $this->setTemplate( $tmpl );
  4.         }
  5.         if ( $variables ) {
  6.             $this->setVars( $variables );
  7.         }
  8.         if ( isset( $this->content ) ) {
  9.             // Replace all variable values
  10.             $this->patterns['jxtvalue'] = "/{jxtvalue=([^}]*)}/ie";
  11.             $this->replacements['jxtvalue'] = "\$this->vars['\\1']";
  12.             // In addition to variables we will also replace any language strings found.
  13.             $this->patterns['jxtlang'] = "/{jxtlang=([^}]*)}/ie";
  14.             $this->replacements['jxtlang'] = "constant('\\1')";
  15.             // Show blocks only if a given variable has a value
  16.             $this->patterns['jxtshowif'] = "#{jxtshowif=([^}]*)}(.*){/jxtshowif}#Usie";
  17.             $this->replacements['jxtshowif'] = "(\$this->vars['\\1']) ? stripslashes('\\2') : ''";
  18.             // Show blocks if a given variable is empty
  19.             $this->patterns['jxtshowifnot'] = "#{jxtshowifnot=([^}]*)}(.*){/jxtshowifnot}#Usie";
  20.             $this->replacements['jxtshowifnot'] = "(\$this->vars['\\1']) ? '' : stripslashes('\\2')";
  21.             $this->output = preg_replace( $this->patterns, $this->replacements, $this->content );
  22.             return true;
  23.         } else {
  24.             return false;
  25.         }
  26.     }
  27.  
The notice error points to the line that begins with "$this->output=..." but I don't know what that error may be..
Mar 17 '08 #4
satas
82
When I used to run my site on my local server, there was no problem, once I inserted it online, it created this Notice error. Thank you in advance for your time!
It means that error_reporting option in your local php.ini file does not allow to output notices.

Add this 2 lines in your script and you will see the same notice on localhost:
[PHP]ini_set('display_errors',1);
error_reporting(E_ALL);[/PHP]

The simpliest solution is to add @ operator in your script:
[PHP]@$this->output = preg_replace( $this->patterns, $this->replacements, $this->content );[/PHP]

But note - adding a lot of @ operators is not a good programming style.
Mar 18 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: NotGiven | last post by:
I have display error ON and error reporting to E_ALL. I have a form that opens fine. When you submit it, all the fields that have nothing in them, for example an un-selected radio button, throw...
1
by: Chris | last post by:
How do I stop displaying "undefined" when using the code below. The problem occurs as I want to display 5 items per page using setInterval but this causes 'mycars' to reach a value that doesn't...
25
by: Nitin Bhardwaj | last post by:
Well, i'm a relatively new into C( strictly speaking : well i'm a student and have been doing & studying C programming for the last 4 years).....and also a regular reader of "comp.lang.c" I...
23
by: Ken Turkowski | last post by:
The construct (void*)(((long)ptr + 3) & ~3) worked well until now to enforce alignment of the pointer to long boundaries. However, now VC++ warns about it, undoubtedly to help things work on 64...
49
by: matty | last post by:
Hi, I recently got very confused (well that's my life) about the "undefined" value. I looked in the FAQ and didn't see anything about it. On...
9
by: Klaus Johannes Rusch | last post by:
IE7 returns "unknown" instead of "undefined" when querying the type of an unknown property of an object, for example document.write(typeof window.missingproperty); Has "unknown" been defined...
5
by: Jason | last post by:
Hello, I am trying to dynamically create a table, then set its <td>'s onclick: var table = document.createElement("table"); var row = table.insertRow(-1); var td = row.insertCell(-1);...
15
by: bill | last post by:
I am trying to write clean code but keep having trouble deciding when to quote an array index and when not to. sometimes when I quote an array index inside of double quotes I get an error about...
5
by: Pseudonyme | last post by:
Dear All : Ever had an httpd error_log bigger than the httpd access log ? We are using Linux-Apache-Fedora-Httpd 2006 configuration. The PHP lines code that lead too tons of errors are : ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.